CLEO Help stuck in coding

CLEO related
Status
Not open for further replies.

blackHat

Expert
Joined
Jul 28, 2013
Messages
930
Reaction score
2
hello, so i was coding but the program just want work , idk what missing if there is

this is the code:
Code:
{$VERSION 3.1.1000}
{$CLEO .cs}

//-------------MAIN---------------//
thread 'unjack' 

:unjack_01
wait 0 
if 
0AB0:   key_pressed 80        // p           
else_jump @unjack_02
0526: set_actor $PLAYER_ACTOR stay_in_car_when_jacked  1
jf @unjack_01
jump @unjack_02

:unjack_02
wait 0
IF
 0AB0:   key_pressed 79 //O
 jf @unjack_01
 0526: set_actor $PLAYER_ACTOR stay_in_car_when_jacked  0
jump @Cunjack_01
 

Protential

Active member
Joined
Jun 8, 2013
Messages
61
Reaction score
0
Pay more attention to your jumps, that's where you messed up.
Code:
{$VERSION 3.1.1000}
{$CLEO .cs}

//-------------MAIN---------------//
thread 'unjack' 

:unjack_01
wait 0 
if 
0AB0:   key_pressed 80        // p           
jf @unjack_01
0526: set_actor $PLAYER_ACTOR stay_in_car_when_jacked  1
jump @unjack_02

:unjack_02
wait 0
if
0AB0:   key_pressed 79 //O
jf @unjack_02
0526: set_actor $PLAYER_ACTOR stay_in_car_when_jacked  0
jump @unjack_01 /code]
 

Opcode.eXe

Expert
Joined
Feb 18, 2013
Messages
1,492
Reaction score
236
Location
( ͡° ͜ʖ ͡°)
You did almost everything correctly. Your problem was your else jump @.

0526: set_actor $PLAYER_ACTOR stay_in_car_when_jacked 1
jf @unjack_01

Why do you have jf @unjack_01 under 0526: set_actor $PLAYER_ACTOR stay_in_car_when_jacked 1 ?
Only do that if you do a IF task.


Code:
{$CLEO .cs}
THREAD "CARJACK"

:ENABLE_MY_MOD
wait 0
if
 0AB0:   key_pressed 80 //P
jf @DISABLE_MY_MOD// IF P IS NOT PRESSED GOTO DISABLE_MY_MOD
0526: set_actor $PLAYER_ACTOR stay_in_car_when_jacked  1
018C: play_sound 1084 at 0.0 0.0 0.0      
0ACD: show_text_highpriority "PLAYER WILL STAY IN CAR WHEN JACKED." time 1337

:DISABLE_MY_MOD
wait 0
if
 0AB0:   key_pressed 79 //O
jf @ENABLE_MY_MOD // IF O IS NOT PRESSED GOTO ENABLE_MY_MOD
0526: set_actor $PLAYER_ACTOR stay_in_car_when_jacked  0
018C: play_sound 1084 at 0.0 0.0 0.0   
0ACD: show_text_highpriority "PLAYER WILL NOT STAY IN CAR WHEN JACKED." time 1337
jump @ENABLE_MY_MOD
 
Status
Not open for further replies.
Top