niume123456
Member
- Joined
- Oct 24, 2014
- Messages
- 18
- Reaction score
- 0
I get very bad fps with this. Any way to fix it? This script arrest neareast player.
Code:
{$CLEO .cs}
0000:
repeat
wait 0
until 0AFA:
while true
wait 0
for 0@ = 0 to 1000
if
0B23: samp is_player_connected 0@
then
0B36: samp 2@ = get_player_nickname 0@
0AB1: @GetSurname 1 FullName 2@ _Return: Surname 3@
if
0B20: samp 4@ = actor_handle_by_samp_player_id 0@
then
if
056D: actor 4@ defined
then
0AB1: @DistanceBetweenTwoPoints 1 ActorHandle 4@ _Return: Distance 5@
if
5@ <= 20.0
then
if
0AB0: key_pressed 104 // 104 = Num8
then
repeat
wait 0
until 8AB0: key_not_pressed 104 // 104 = Num8
say "/isodinti %s" 3@
end
end
end
end
end
end
end
:DistanceBetweenTwoPoints
04C4: store_coords_to 1@ 2@ 3@ from_actor 0@ with_offset 0.0 0.0 0.0
04C4: store_coords_to 4@ 5@ 6@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
0509: 7@ = distance_between_XY 1@ 2@ and_XY 4@ 5@
0AB2: ret 1 7@
:GetSurname
0085: 28@ = 0@ // (int)
0085: 27@ = 0@ // (int)
29@ = 0
for 31@ = 0 to 200
0A8D: 30@ = read_memory 28@ size 1 virtual_protect 1
if 30@ == 0
then
break
else
28@++
29@++
end
if 31@ == 200
then
//chatmsg "string seems to be over 200 chars" -1
end
end
for 31@ = 1 to 29@
0A8D: 30@ = read_memory 0@ size 1 virtual_protect 1
if 30@ == 95 // if the character is "_" (ASCII table)
then
0@++
//chatmsg 0@ -1
0AB2: ret 1 0@
else
0@++
end
end
0AB2: ret 1 27@