{$CLEO}
0000:
repeat
wait 0
until Samp.Available()
0B34: samp register_client_command "pfind" to_label @cmd
31@ = Render.CreateFont("ARIAL", 8, 5)
0BB9: samp 0@ = get_pickup_pool_ptr
12@ = -1
while true
wait 0
if
10@ == 1
then
for 1@ = 0 to 4096
if
0B51: samp 2@ = pickup_handle_by_id 1@
then
0A90: 2@ = 1@ * 20
000A: 2@ += 61444
000A: 2@ += 0@ // stPickup
0A8D: 3@ = read_memory 2@ size 4 virtual_protect TRUE // iModelID
if
003B: 3@ == 12@
then
0C0C: 3@ = struct 2@ offset 8 size 4 // X
0C0C: 4@ = struct 2@ offset 12 size 4 // Y
0C0C: 5@ = struct 2@ offset 16 size 4 // Z
if
00C2: sphere_onscreen 3@ 4@ 5@ radius 5.0
then
00A0: store_actor $PLAYER_ACTOR position_to 28@ 29@ 30@
050A: 17@ = distance_between_XYZ {ACTOR}28@ 29@ 30@ {PICK}3@ 4@ 5@
0B55: convert_3D_coords 3@ 4@ 5@ to_screen 3@ 4@
00A0: store_actor $PLAYER_ACTOR position_to 5@ 6@ 7@
0B55: convert_3D_coords 5@ 6@ 7@ to_screen 5@ 6@
0B68: render draw_line_point1 5@ 6@ point2 3@ 4@ width 1 color 0xFFFF0000
alloc 23@ 128
format 23@ "ID: %d%cDIST: %.0f" 12@ 0x0A 17@
Render.DrawText(31@, 23@, 3@, 4@, -1)
free 23@
end
end
end
end
end
end
:cmd
Samp.IsCommandTyped(9@)
if
0AD4: 11@ = scan_string 9@ format "%d" 12@
then
10@ = 1
printf "~g~Pfind started for ~w~%d" 1000 12@
else
10@ = 0
12@ = -1
printf "~r~Pfind disabled" 1000
end
Samp.CmdRet()