CLEO Help Need help with this script!

CLEO related
Status
Not open for further replies.

4changesLeft

Well-known member
Joined
Apr 10, 2015
Messages
365
Reaction score
3
Hey guys! I need help with this script. What I'm trying to do is, while I'm in my car, when I type the command "/loading id" I send the targeted player to loading screen, I just don't know what's wrong, because it keeps crashing after I type the command.. Sorry if it's something obvious or stupid,  I'm still a begginer..
Thanks in advance!  :D 


Code:
{$CLEO .cs}

0000: NOP
0B34: samp register_client_command "loading" to_label @MAIN
31@ = 0

:MAIN
wait 0 
if
31@ = 1 
else_jump @MAIN 
wait 100 
Actor.StorePos($PLAYER_ACTOR, 10@, 21@, 32@) 
036A: put_actor $PLAYER_ACTOR in_car 6@ 
wait 100 
Car.PutAt(0@, -1.792915E38, -1.25, 5019.66)
Actor.PutAt($PLAYER_ACTOR, -1.792915E38, -1.25, 5019.66)
wait 400 
0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 10@ 21@ 32@ 
31@ = 0 
SAMP.CmdRet
jump @MAIN
 

Infam0s

Active member
Joined
Apr 2, 2016
Messages
66
Reaction score
0
TehArgis said:
Hey guys! I need help with this script. What I'm trying to do is, while I'm in my car, when I type the command "/loading id" I send the targeted player to loading screen, I just don't know what's wrong, because it keeps crashing after I type the command.. Sorry if it's something obvious or stupid,  I'm still a begginer..
Thanks in advance!  :D 

1. You forget to use parameters.
2. You forget to use @6.
3. You define 31@ = 1 and you need to do that: 31@ == 1, but also you didn't used it.
And I think thats it.

Code:
{$CLEO .cs}

// [ -------------------- ]
//   SOURCE: TH3RM4L
//   REMAKE: ENTITYFORCEX
// [ -------------------- ]
 
0000: NOP
0B34: samp register_client_command "loading" to_label @CMD
0@ = 0

:MAIN
wait 0
if 
  0@ == 1 
else_jump @MAIN 
Actor.StorePos($PLAYER_ACTOR, 7@, 8@, 9@)
036A: put_actor $PLAYER_ACTOR in_car 6@
wait 100
Car.PutAt(0@, -1.792915E38, -1.25, 5019.66)
Actor.PutAt($PLAYER_ACTOR, -1.792915E38, -1.25, 5019.66)
wait 400
036A: put_actor $PLAYER_ACTOR in_car 5@ 
0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 7@ 8@ 9@ 
036A: put_actor $PLAYER_ACTOR in_car 5@ 
0@ = 0 
SAMP.CmdRet
jump @MAIN

:CMD
wait 0 
   SAMP.IsCommandTyped(1@)
if 
0AD4: 2@ = scan_string 1@ format "%d" 3@  
else_jump @TH3RM4L_395 
if 
   Actor.Driving($PLAYER_ACTOR)
else_jump @TH3RM4L_474 
if 
   SAMP.IsPlayerConnected(3@)
else_jump @TH3RM4L_523 
4@ = SAMP.GetActorHandleByPlayerID(3@)
if 
056D:   actor 4@ defined 
else_jump @TH3RM4L_563 
if 
   Actor.Driving(4@)
else_jump @TH3RM4L_629 
5@ = Actor.CurrentCar($PLAYER_ACTOR)
6@ = Actor.CurrentCar(4@)
if and
056E:   car 5@ defined 
056E:   car 6@ defined 
else_jump @TH3RM4L_770 
if and
   not Actor.InCar($PLAYER_ACTOR, 6@)
   not Actor.InCar(4@, 5@)
else_jump @TH3RM4L_697 
0@ = 1 
SAMP.CmdRet
goto @MAIN 

:TH3RM4L_395
wait 0 
0AF8: samp add_message_to_chat "USAGE: /loading <ID>" color 12566463  
SAMP.CmdRet
goto @MAIN 

:TH3RM4L_474
wait 0 
0AF8: samp add_message_to_chat "ERROR: You must be driving" color 12517890  
SAMP.CmdRet
goto @MAIN 

:TH3RM4L_523
wait 0 
0AF8: samp add_message_to_chat "ERROR: Invalid ID" color 12517890  
SAMP.CmdRet
goto @MAIN 

:TH3RM4L_563
wait 0 
0AF8: samp add_message_to_chat "ERROR: That player is too far away from you" color 12517890  
SAMP.CmdRet
goto @MAIN 

:TH3RM4L_629
wait 0 
0AF8: samp add_message_to_chat "ERROR: That player is not driving any vehicle" color 12517890  
SAMP.CmdRet
goto @MAIN 

:TH3RM4L_697
wait 0 
0AF8: samp add_message_to_chat "ERROR: You and that player are in the same vehicle" color 12517890  
SAMP.CmdRet
goto @MAIN 

:TH3RM4L_770
wait 0 
0AF8: samp add_message_to_chat "ERROR: Couldn't define the vehicles" color 12517890  
SAMP.CmdRet
goto @MAIN


Beside, I think that "loading" causes because the s0beit, other players will keep flying.
 
Status
Not open for further replies.
Top