I did not know how to demand that the samp is ready and the player is chosen to start the script so I did ativacao2
When I type /contrabando the game crashes
I want it to check if any player(admin or not) is near the future coordinate that i will spawn, if yes, then stop the code, else...spawn and repeat the cicle
When I type /contrabando the game crashes
I want it to check if any player(admin or not) is near the future coordinate that i will spawn, if yes, then stop the code, else...spawn and repeat the cicle
CLEO:
{$CLEO .cs}
0000:
REPEAT
WAIT 0
UNTIL 0AFA: SAMP_IS_READY
0B34: "CONTRABANDO" @ativacao
WHILE TRUE
wait 0
if 0@ == 1
then
0AB1: @ativacao2 0
end
END
:ativacao
0B12: 0@ = 0@ XOR 1
if 0@ == 1
then 0AF8: "{FF0000}CLEO:{FFFFFF} CB Ativado!" -1
else 0AF8: "{FF0000}CLEO:{FFFFFF} CB Desativado!" -1
END
0B43:
:ativacao2
wait 0
if and
0@ == 1
056D: actor $PLAYER_ACTOR defined
then
0AB1: @CB 0
END
0B43:
:CB
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 9@ closest_ped_to 10@
if and
00FE: actor 10@ 0 near_point_3d 3@ 4@ 5@ radius 150.0 150.0 150.0
00FE: actor 10@ 0 near_point_3d 6@ 7@ 8@ radius 150.0 150.0 150.0
then
0AB1: @ativacao 0
else
//03C0: 0@ = actor $PLAYER_ACTOR car
//0175: set_car 0@ Z_angle_to 90.0
WAIT 2500 ms
3@ = 2311.3757
4@ = 2774.7578
5@ = 10.8035
Actor.PutAt($PLAYER_ACTOR, 3@, 4@, 5@)
WAIT 500 ms
0AF9: "/Carregar"
if and
00FE: actor 10@ 0 near_point_3d 3@ 4@ 5@ radius 150.0 150.0 150.0
00FE: actor 10@ 0 near_point_3d 6@ 7@ 8@ radius 150.0 150.0 150.0
then
0AB1: @ativacao 0
else
WAIT 2500 ms
6@ = 2580.8347
7@ = -945.1074
8@ = 81.4031
Actor.PutAt($PLAYER_ACTOR, 6@, 7@, 8@)
WAIT 500 ms
0AF9: "/Descarregar"
END
END