Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1@ = 0 // stage
- 2@ = 0 // airtime start
- 3@ = 0 // airtime finish
- 4@ = 0 // total airtime
- while true
- wait 0
- if
- 0256: is_player_playing $PLAYER_CHAR
- then
- if
- 00DF: is_char_in_any_car $PLAYER_ACTOR
- then
- if
- 1@ == 0 // stage 0 - we haven't already got the car handle, get it
- then
- 03C0: 0@ = store_car_char_is_in_no_save $PLAYER_ACTOR
- 1@ = 1 // we've got the car handle, next stage!
- end
- if
- 8119: not is_car_dead 0@ // better keep making sure handle is valid before using it
- then
- if
- 00DB: is_char_in_car $PLAYER_ACTOR car 0@
- then
- if
- 1@ == 1 // stage 1 - waiting for airtime to start
- then
- if
- 01F3: is_car_in_air_proper 0@
- then
- 01BD: get_game_timer 2@
- 1@ = 2 // airtime started, next stage!
- end
- end
- if
- 1@ == 2 // stage 2 - airtime in progress
- then
- if
- 81F3: not is_car_in_air_proper 0@
- then
- // airtime over
- 01BD: get_game_timer 3@
- // get total air time
- 0085: 4@ = 3@
- 0062: 4@ -= 2@
- if
- 4@ > 1000 // is total airtime worth noting?
- then
- // yes, make a big deal out of it
- 01E4: print_with_number 'AIRTIME' number 4@ time 2000 1 // not a real gxt, this is just an example script
- end
- 1@ = 3 // go to stage 3, where we reset stuff
- 2@ = 0
- 3@ = 0
- end
- end
- else
- 1@ = 4
- end
- else
- // car died, go to master reset stage!
- 1@ = 4
- end
- if
- 1@ == 3 // stage 3 - reset stuff and jump back a few stages
- then
- 1@ = 1 // go back to stage 1, where we still have the car handle but airtime hasn't started
- 2@ = 0
- 3@ = 0
- end
- if
- 1@ == 4 // stage 4 - reset stuff and start over
- then
- 1@ = 0
- 2@ = 0
- 3@ = 0
- end
- else
- 1@ = 0 // player exited car, reset the stage
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement