Code:
:cmd_114
SAMP.IsCommandTyped(20@)
if 056D: does_char_exist $PLAYER_ACTOR
then
0AB5: store_closest_entities $PLAYER_ACTOR vehicle_to 0@ ped_to 1@
if 056D: does_char_exist 1@
then
0AB5: store_closest_entities 1@ vehicle_to 5@ ped_to 6@
if 056E: does_vehicle_exist 5@
then
046C: 25@ = car 5@ driver
if 056D: does_char_exist 25@
then
2@ = SAMP.GetSAMPPlayerIDByActorHandle(25@)
0AF9: samp say_msg "/repair %d 1" 2@
end
end
end
end
SAMP.CmdRet()
I made this command which works perfectly with cleo 4.1 but if i update to 4.3 and use the command again, nothing happens, the game doesn't crash or anything i'm guessing because of the 056D: opcode but i don't know why.
This command gets the closest driver to me and does "/repair <driver id> 1" on him. Can anyone suggest how to fix it for 4.3 or is there a better way to get the id of the closest car driver?