kool
Active member
- Joined
- Jun 4, 2016
- Messages
- 89
- Reaction score
- 0
I used this script to make Get the closest ID keybinder and it doesn't work.
code is by springfield.
[img=329x30]https://image.prntscr.com/image/TXqEahiKSsi591NssKRVyg.png[/img]
CODE :
{$CLEO}
0000:
REPEAT
WAIT 0
UNTIL 0AFA:
WHILE TRUE
WAIT 0
IF AND
0AB0: 2
056D: actor $PLAYER_ACTOR defined
0B61: samp is_local_player_spawned
THEN
CALL @GetClosestPed 0 2@
IF 056D: actor 2@ defined
THEN
IF 0B2B: samp 3@ = get_player_id_by_actor_handle 2@
THEN say"/pm %i test" 3@
END
END
END
END
:GetClosestPed
var
0@ : float
5@ : float
end
0@ = 600.0
1@ = -1
00A0: $PLAYER_ACTOR 2@ 3@ 4@
0A8D: 29@ = read_memory 0xB74490 size 4 virtual_protect 0
000A: 29@ += 0x4
0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0
for 30@ = 0 to 35584 step 0x100
0A8D: 31@ = read_memory 29@ size 1 virtual_protect 0
000A: 29@ += 0x1
if and
0029: 31@ >= 0x00
001B: 0x80 > 31@
then
005A: 31@ += 30@
if 003B: 31@ == $PLAYER_ACTOR
then continue
end
00A0: 31@ 6@ 7@ 8@
0509: 5@ = distance_between_XY 2@ 3@ 6@ 7@
if 5@ < 0@
then
0087: 0@ = 5@
0085: 1@ = 31@
end
end
end
0AB2: ret 1 1@
code is by springfield.
[img=329x30]https://image.prntscr.com/image/TXqEahiKSsi591NssKRVyg.png[/img]
CODE :
{$CLEO}
0000:
REPEAT
WAIT 0
UNTIL 0AFA:
WHILE TRUE
WAIT 0
IF AND
0AB0: 2
056D: actor $PLAYER_ACTOR defined
0B61: samp is_local_player_spawned
THEN
CALL @GetClosestPed 0 2@
IF 056D: actor 2@ defined
THEN
IF 0B2B: samp 3@ = get_player_id_by_actor_handle 2@
THEN say"/pm %i test" 3@
END
END
END
END
:GetClosestPed
var
0@ : float
5@ : float
end
0@ = 600.0
1@ = -1
00A0: $PLAYER_ACTOR 2@ 3@ 4@
0A8D: 29@ = read_memory 0xB74490 size 4 virtual_protect 0
000A: 29@ += 0x4
0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0
for 30@ = 0 to 35584 step 0x100
0A8D: 31@ = read_memory 29@ size 1 virtual_protect 0
000A: 29@ += 0x1
if and
0029: 31@ >= 0x00
001B: 0x80 > 31@
then
005A: 31@ += 30@
if 003B: 31@ == $PLAYER_ACTOR
then continue
end
00A0: 31@ 6@ 7@ 8@
0509: 5@ = distance_between_XY 2@ 3@ 6@ 7@
if 5@ < 0@
then
0087: 0@ = 5@
0085: 1@ = 31@
end
end
end
0AB2: ret 1 1@