CLEO Help [Help request]Wait and 0B34 are not compatible

CLEO related
Status
Not open for further replies.

ThermaL

Expert
Joined
Oct 23, 2013
Messages
1,593
Reaction score
3
Hi,

ok so I tried to make a cleo which I saw on youtube (https://www.youtube.com/watch?v=0fRfOOaEHkc)
and I made this:

0B34: samp register_client_command "target" to_label @Noname_97

while true
wait 0
end

:Noname_97
wait 0
  SAMP.IsCommandTyped(0@)
if
0AD4: 1@ = scan_string 0@ format "%d" 2@ 
else_jump @Noname_91
jump @Noname_140

:Noname_140
wait 0
4@ = SAMP.GetActorHandleByPlayerID(2@)
if
056D:  actor 4@ defined
else_jump @Noname_91
04C4: store_coords_to 5@ 6@ 7@ from_actor 4@ with_offset 0.0 0.0 150.0
jump @Noname_307

:Noname_307
wait 0
04C4: store_coords_to 17@ 18@ 19@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 -1.0
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 20@ closest_ped_to 24@
jump @A

:A
wait 0
if
056E:  car 20@ defined
else_jump @Noname_91
072A: put_actor $PLAYER_ACTOR into_car 20@ driverseat
Actor.StorePos($PLAYER_ACTOR, 21@, 22@, 23@)
0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 21@ 22@ 23@
072A: put_actor $PLAYER_ACTOR into_car 20@ driverseat
wait 150
Car.PutAt(20@, 5@, 6@, 7@)
Car.Health(20@) = 0
wait 150
0731: set_car 20@ y_angle_to 180.0
wait 150
0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 17@ 18@ 19@
SAMP.CmdRet()


:Noname_91
wait 0
SAMP.CmdRet

The problem is it doesn't read the waits.. it's like I didn't even wrote them.

Example:

Code:
0B34: samp register_client_command "SAY" to_label @A

while true
wait 0 
end

:A
wait 0
0AF9: samp say_msg "a_"
wait 5000
0AF9: samp say_msg "_b"
wait 10000
0AF9: samp say_msg "_c_"
SAMP.CmdRet

and it spams like this:

[12:30:15]  TH3RM4L: _a

[12:30:15]  TH3RM4L: b_ 

[12:30:15]  TH3RM4L: _c_ 

y u no wait?  :yuno:

Please help me if you can, thanks in advance.
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
271
Use command just for activation. Then put the whole script in a loop.
Like this;

Code:
{$CLEO}
0000:
wait 3000

31@ = 0
0B34: samp register_client_command "target" to_label @test

while true 
wait 0 
if 31@ == 1
then
    04C4: store_coords_to 5@ 6@ 7@ from_actor 4@ with_offset 0.0 0.0 150.0
    04C4: store_coords_to 17@ 18@ 19@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 -1.0
    0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 20@ closest_ped_to 24@
    if 056E: car 20@ defined 
    then
        072A: put_actor $PLAYER_ACTOR into_car 20@ driverseat
        Actor.StorePos($PLAYER_ACTOR, 21@, 22@, 23@)
        0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 21@ 22@ 23@ 
        072A: put_actor $PLAYER_ACTOR into_car 20@ driverseat
        wait 150
        Car.PutAt(20@, 5@, 6@, 7@)
        Car.Health(20@) = 0
        wait 150
        0731: set_car 20@ y_angle_to 180.0
        wait 150
        0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 17@ 18@ 19@     
    end
    31@ = 0
end
END

:test
SAMP.IsCommandTyped(0@)
if 0AD4: 1@ = 0@ format "%d" 2@
then 4@ = SAMP.GetActorHandleByPlayerID(2@)
    if 056D: actor 4@ defined
    then 31@ = 1
    else 0AF8: "player dead/not streamed?" -1
    end
else 0AF8: "use /target <ID>" -1
end
0B43: cmd_ret
 

ThermaL

Expert
Joined
Oct 23, 2013
Messages
1,593
Reaction score
3
springfield link said:
Use command just for activation. Then put the whole script in a loop.
Like this;

Code:
{$CLEO}
0000:
wait 3000

31@ = 0
0B34: samp register_client_command "target" to_label @test

while true 
wait 0 
if 31@ == 1
then
    04C4: store_coords_to 5@ 6@ 7@ from_actor 4@ with_offset 0.0 0.0 150.0
    04C4: store_coords_to 17@ 18@ 19@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 -1.0
    0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 20@ closest_ped_to 24@
    if 056E: car 20@ defined 
    then
        072A: put_actor $PLAYER_ACTOR into_car 20@ driverseat
        Actor.StorePos($PLAYER_ACTOR, 21@, 22@, 23@)
        0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 21@ 22@ 23@ 
        072A: put_actor $PLAYER_ACTOR into_car 20@ driverseat
        wait 150
        Car.PutAt(20@, 5@, 6@, 7@)
        Car.Health(20@) = 0
        wait 150
        0731: set_car 20@ y_angle_to 180.0
        wait 150
        0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 17@ 18@ 19@     
    end
    31@ = 0
end
END

:test
SAMP.IsCommandTyped(0@)
if 0AD4: 1@ = 0@ format "%d" 2@
then 4@ = SAMP.GetActorHandleByPlayerID(2@)
    if 056D: actor 4@ defined
    then 31@ = 1
    else 0AF8: "player dead/not streamed?" -1
    end
else 0AF8: "use /target <ID>" -1
end
0B43: cmd_ret
Oh, thanks.
 
Status
Not open for further replies.
Top