Got crash from it, other suggest way to resolve it ?!
It's all the code:
{$CLEO}
thread "RepairAll"
repeat
wait 0
until 0AFA:
0B63: "repairall"
0B34: "repairall" @REPAIRALL
WHILE TRUE
wait 0
if 0@ == 1
then
0@ = 0
for 1@ = 0 to 999
if SAMP.IsPlayerConnected(1@)
then
2@ = SAMP.GetActorHandleByPlayerID(1@)
10@ = SAMP.GetPlayerColor(1@)
if 056D: actor 2@ defined
then
00A0: store_actor 2@ position_to 3@ 4@ 5@
00A0: store_actor $PLAYER_ACTOR position_to 6@ 7@ 8@
050A: 9@ = distance_between_XYZ 3@ 4@ 5@ and_XYZ 6@ 7@ 8@
if not 9@ > 15.0
then
if or
not 10@ == 0xAA3333
not 10@ == 0xAA3333FF
then
say "/repair %d 1" 1@
wait 200
end
end
end
end
end
END
:REPAIRALL
0B12: 0@ = 0@ XOR 1
cmdret