Jump to content

CLEO SCRIPT: How to make 2 Conditions with 1 Commands


Recommended Posts

Hello everyone, i was doing some projects about PA Systems on vehicles. This projects have two ways to deactivate it. Either Turn off manually OR Car is exploded. But i was difficult to make 2 ways for 1 commands. I was struggle on this script but nothing happens on 2nd way. Here's a code for you (DO NOT BUMP!!)

 

{$CLEO .cs}

//-------------MAIN---------------
0000: NOP 
 

:PUBLIC_ADDRESS_9
0001: wait 0 ms 
00D6: if 
0256:   player $PLAYER_CHAR defined 
004D: jump_if_false @PUBLIC_ADDRESS_9 
if and
84AB:   not actor $PLAYER_ACTOR driving_plane
89AE:   not actor $PLAYER_ACTOR driving_train
00DF:   actor $PLAYER_ACTOR driving 
0ADC:   test_cheat "PA9" 
jf @PUBLIC_ADDRESS_9

jf @PUBLIC_ADDRESS_9 
03C0: 1@ = actor $PLAYER_ACTOR car
wait 0 
0AC1: 0@ "CLEO\AUDIO\PA_TEST.MP3"
0AC5: link_3d_audiostream 0@ to_vehicle 1@
0ABC: set_audiostream 0@ volume 1.0
0AAD: set_audiostream 0@ perform_action 1     

:PUBLIC_ADDRESS_8
0001: wait 0 ms 
if
0119:   car 1@ wrecked     
jf @PUBLIC_ADDRESS_8
jump @PUBLIC_ADDRESS_6

:PUBLIC_ADDRESS_7
if
0256:   player $PLAYER_CHAR defined
004D: jump_if_false @PUBLIC_ADDRESS_7
if and
00DB:   actor $PLAYER_ACTOR in_car 1@ 
is_key_pressed 77
is_key_pressed 8 
jf @PUBLIC_ADDRESS_7
jump @PUBLIC_ADDRESS_6

:PUBLIC_ADDRESS_6
0AAD: set_audiostream 0@ perform_action 1   
0AAE: remove_audio_stream 0@  
jump @PUBLIC_ADDRESS_9 

If someone can help this code, i'll thanks for it!

Bump! This topic can being turn off now, because the code is founded. All you have to do is using jump at the end of script then commutative it. This the script may help you out

// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
0000: NOP 
 

:PUBLIC_ADDRESS_9
0001: wait 0 ms 
00D6: if 
0256:   player $PLAYER_CHAR defined 
004D: jump_if_false @PUBLIC_ADDRESS_9 
if and
84AB:   not actor $PLAYER_ACTOR driving_plane
89AE:   not actor $PLAYER_ACTOR driving_train
00DF:   actor $PLAYER_ACTOR driving 
0ADC:   test_cheat "PATEST" 
jf @PUBLIC_ADDRESS_9

jf @PUBLIC_ADDRESS_9 
03C0: 1@ = actor $PLAYER_ACTOR car
wait 0 
0AC1: 0@ "CLEO\AUDIO\PA-TEST.MP3"
0AC5: link_3d_audiostream 0@ to_vehicle 1@
0ABC: set_audiostream 0@ volume 1.0
0AAD: set_audiostream 0@ perform_action 1
jump @PUBLIC_ADDRESS_8     

:PUBLIC_ADDRESS_8
0001: wait 0 ms 
if
0256:   player $PLAYER_CHAR defined 
jf @PUBLIC_ADDRESS_8 
if and          
00DB:   actor $PLAYER_ACTOR in_car 1@ 
is_key_pressed 77 
is_key_pressed 8      
                
jf @PUBLIC_ADDRESS_7
0AAD: set_audiostream 0@ perform_action 0 
wait 0
0AAE: release_audiostream 0@  
jump @PUBLIC_ADDRESS_9  

:PUBLIC_ADDRESS_7
0001: wait 0 ms 
if
056E:   car 1@ defined
004D: jump_if_false @PUBLIC_ADDRESS_7 
if
0119:   car 1@ wrecked     

jf @PUBLIC_ADDRESS_8
0AAD: set_audiostream 0@ perform_action 0 
wait 0
0AAE: release_audiostream 0@   
jump @PUBLIC_ADDRESS_9  

 

Guest
This topic is now closed to further replies.
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.