CLEO Help Help with anti fall

CLEO related
Status
Not open for further replies.

Edvincik

Well-known member
Joined
Mar 15, 2016
Messages
399
Reaction score
27
Code:
//-------------MAIN---------------
thread 'STAY_ON_BIKE' 

:STAY_ON_BIKE_19
wait 0 
if 
   Player.Defined($PLAYER_CHAR)
else_jump @STAY_ON_BIKE_19 
wait 0 
08C6: set_actor $PLAYER_ACTOR stay_on_bike 1 
wait 0 
0A93: end_custom_thread

Hello everybody, can somebody help me to add on/off button for this, because whatever i am adding it crashes to me.
 
Joined
Dec 31, 2015
Messages
712
Reaction score
27
Did with high level syntax so this code might look a bit complicated for ya
Code:
//-------------MAIN---------------
0000: NOP 
13@ = 0 

:Noname_9
wait 0 
if 
key_down 114 
jf @Noname_96 
if 
   Player.Defined($PLAYER_CHAR)
jf @Noname_91 
if 
  13@ == 0 
jf @Noname_76 
13@ = 1 
goto @Noname_83 

:Noname_76
13@ = 0 

:Noname_83
08C6: set_actor $PLAYER_ACTOR stay_on_bike 13@ 

:Noname_91
wait 300 

:Noname_96
goto @Noname_9
 

MrChristmas

Expert
Joined
Jul 29, 2014
Messages
563
Reaction score
26
"low" level syntax:

Code:
{$CLEO .cs}

thread '_STAY_ON_BIKE_' 

:MAIN
wait 0 
if 
   Player.Defined($PLAYER_CHAR)
else_jump @MAIN

:ACTIVATION_CHECK
wait 0
if
0ADC:   test_cheat "BIK"
else_jump @ACTIVATION_CHECK 
print "BIKE ~G~ON" 1500 
wait 0 
08C6: set_actor $PLAYER_ACTOR stay_on_bike 1 
wait 1000
jump @DEACTIVATION_CHECK

:DEACTIVATION_CHECK
wait 0
if
0ADC:   test_cheat "BIK"
else_jump @DEACTIVATION_CHECK
print "BIKE ~R~OFF" 1500 
08C6: set_actor $PLAYER_ACTOR stay_on_bike 0
wait 1000
jump @MAIN
 
Joined
Dec 31, 2015
Messages
712
Reaction score
27
Mr.Christmas said:
"low" level syntax:

Code:
{$CLEO .cs}

thread '_STAY_ON_BIKE_' 

:MAIN
wait 0 
if 
   Player.Defined($PLAYER_CHAR)
else_jump @MAIN

:ACTIVATION_CHECK
wait 0
if
0ADC:   test_cheat "BIK"
else_jump @ACTIVATION_CHECK 
print "BIKE ~G~ON" 1500 
wait 0 
08C6: set_actor $PLAYER_ACTOR stay_on_bike 1 
wait 1000
jump @DEACTIVATION_CHECK

:DEACTIVATION_CHECK
wait 0
if
0ADC:   test_cheat "BIK"
else_jump @DEACTIVATION_CHECK
print "BIKE ~R~OFF" 1500 
08C6: set_actor $PLAYER_ACTOR stay_on_bike 0
wait 1000
jump @MAIN

Did I do a mistake?
 
Status
Not open for further replies.
Top