Napisano dnia: 2014-02-22 11:26:32
Chciałem napisać skrypt na to że po wyjściu i wejściu do samochodu pojazd automatycznie się wyłącza i włącza. Jednak jakoś mi to nie idzie. Mam coś takiego i jak postać wychodzi z pojazdu gra się wyłącza.
Kod:
{$CLEO .cs}
thread 'silnik'
:check1
wait 0
if
Actor.Driving($PLAYER_ACTOR)
jf @check1
0@ = Actor.CurrentCar($PLAYER_ACTOR)
0ABF: set_vehicle 0@ engine_state_to 1
:check2
wait 0
if
not Actor.Driving($PLAYER_ACTOR)
jf @check2
1@ = Actor.CurrentCar($PLAYER_ACTOR)
0ABF: set_vehicle 1@ engine_state_to 0
end_thread
thread 'silnik'
:check1
wait 0
if
Actor.Driving($PLAYER_ACTOR)
jf @check1
0@ = Actor.CurrentCar($PLAYER_ACTOR)
0ABF: set_vehicle 0@ engine_state_to 1
:check2
wait 0
if
not Actor.Driving($PLAYER_ACTOR)
jf @check2
1@ = Actor.CurrentCar($PLAYER_ACTOR)
0ABF: set_vehicle 1@ engine_state_to 0
end_thread