{$CLEO .cs}
{$USE bitwise}
0000:
WHILE TRUE
WAIT 0
IF 0ADC: test_cheat "1"
THEN
IF 0256: player $PLAYER_CHAR defined
THEN
IF 0AB1: @GetClosestPeds 0 0@
THEN
IF 0AB1: @SAMPGetPlayerIDByActorHandle 1 _ActorHandle 0@ _Returned: ID 1@
THEN
0AC8: 2@ = allocate_memory_size 260
0AD3: 2@ = format "/repairall %d" 1@
0AB1: @SEND_CMD 2 SampVersionID 3 Text 2@
0AC9: free_allocated_memory 2@
END
END
END
END
END
0A93: terminate_this_custom_script
{$CLEO .cs}
{$USE bitwise}
0000:
WHILE TRUE
WAIT 0
IF 0ADC: test_cheat "1"
THEN
IF 0256: player $PLAYER_CHAR defined
THEN
IF 0AB1: @GetClosestPeds 0 0@
THEN
IF 0AB1: @SAMPGetPlayerIDByActorHandle 1 _ActorHandle 0@ _Returned: ID 1@
THEN
0AC8: 2@ = allocate_memory_size 260
0AD3: 2@ = format "/repairall %d" 1@
0AB1: @SEND_CMD 2 SampVersionID 3 Text 2@
0AC9: free_allocated_memory 2@
END
END
END
END
END
0A93: terminate_this_custom_script
PHP:{$CLEO .cs} {$USE bitwise} 0000: WHILE TRUE WAIT 0 IF 0ADC: test_cheat "1" THEN IF 0256: player $PLAYER_CHAR defined THEN IF 0AB1: @GetClosestPeds 0 0@ THEN IF 0AB1: @SAMPGetPlayerIDByActorHandle 1 _ActorHandle 0@ _Returned: ID 1@ THEN 0AC8: 2@ = allocate_memory_size 260 0AD3: 2@ = format "/repairall %d" 1@ 0AB1: @SEND_CMD 2 SampVersionID 3 Text 2@ 0AC9: free_allocated_memory 2@ END END END END END 0A93: terminate_this_custom_script
Can you make a similar one for the cars?PHP:{$CLEO .cs} {$USE bitwise} 0000: WHILE TRUE WAIT 0 IF 0ADC: test_cheat "1" THEN IF 0256: player $PLAYER_CHAR defined THEN IF 0AB1: @GetClosestPeds 0 0@ THEN IF 0AB1: @SAMPGetPlayerIDByActorHandle 1 _ActorHandle 0@ _Returned: ID 1@ THEN 0AC8: 2@ = allocate_memory_size 260 0AD3: 2@ = format "/repairall %d" 1@ 0AB1: @SEND_CMD 2 SampVersionID 3 Text 2@ 0AC9: free_allocated_memory 2@ END END END END END 0A93: terminate_this_custom_script
that's right"/repair Sultan" - like that?
SA:MP Version?
btw. 0AB1: @SEND_CMD 2 SampVersionID 3 Text 2@
- SampVersionID 3 is for 0.3.DL
{$CLEO .cs}
0000:
WHILE TRUE
WAIT 0
IF 0ADC: test_cheat "1"
THEN
IF 0256: player $PLAYER_CHAR defined
THEN
IF 0AB1: @GetClosestVehicle 0 0@
THEN
IF 0AB1: @SAMPGetCarIDFromVehicleHandle 1 _VehicleHandle 0@ _StoreCarID 1@
THEN
0AC8: 4@ = allocate_memory_size 260
0441: 3@ = car 0@ model
0ADB: 4@ = car_model 3@ name
0AC8: 2@ = allocate_memory_size 260
0AD3: 2@ = format "/repairall %s" 4@
0AB1: @SEND_CMD 2 SampVersionID 3 Text 2@
0AD1: show_formatted_text_highpriority "%s" time 1337 2@ // test
0AC9: free_allocated_memory 2@
0AC9: free_allocated_memory 4@
END
END
END
END
END
0A93: terminate_this_custom_script
it works great, thank you two so muchIt is all possible thanks to @Parazitas