CLEO Help [CLEO HELP] Why engine not always want on?

CLEO related
Status
Not open for further replies.

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Why engine not always want on?

If engine started when fast off... o_O



Code:
{$CLEO .cs}

//-------------MAIN---------------
Thread 'EngineChecker'

wait 0 

:EngineChecker_4
wait 0 
if and
   Player.Defined($PLAYER_CHAR)
   Actor.Driving($PLAYER_ACTOR)
jf @EngineChecker_4 
goto @EngineChecker_36 

:EngineChecker_36
1@ = Actor.CurrentCar($PLAYER_ACTOR) 
0ABF: 1@ = vehicle 0@ engine_operation
if
1@ > 0
then
wait 3000
0ABE:   vehicle 1@ engine_on 1
wait 1
0918: set_car 1@ engine_operation 1
wait 2
0ABF: set_vehicle 1@ engine_state_to 1
wait 3
081D: set_car 1@ engine_broken 0

end
goto @EngineChecker_4


- Other -

Question - possible create cleo when say command like "/PM Hello" in all players with one command
 
Joined
Dec 31, 2015
Messages
712
Reaction score
27
Parazitas said:
Question - possible create cleo when say command like "/PM Hello" in all players with one command
[/align]

Create a FOR loop, and iterate thru all ID's online


Also regarding your problem.. 0ABF opcode is used for setting car's engine state, not parsing it, 0ABF: cleo_switch_car_engine 0@ to 0; Parameters : 1) Vehicle handle (Integer) (INT) 2) Boolean (1 or 0) (INT)
You can also look up for these opcodes here so next time you wont make a mistake in your script : http://gtag.gtagaming.com/opcode-database/
 
Status
Not open for further replies.
Top