Save pickup

From GTAMods Wiki
Revision as of 21:52, 17 April 2010 by Spaceeinstein (talk | contribs) (Created page with 'This is a code snippet for a save pickup in Sanny Builder's format for Vice City and San Andreas. The code is based on the save pickups in Vice City. <source lang="s…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This is a code snippet for a save pickup in Sanny Builder's format for Vice City and San Andreas. The code is based on the save pickups in Vice City.

:PSAVEX
03A4: name_thread 'PSAVEX' 
0007: 0@ = 0.0 // x coord pickup
0007: 1@ = 0.0 // y coord pickup 
0007: 2@ = 0.0 // z coord pickup
0007: 3@ = 0.0 // put player x coord
0007: 4@ = 0.0 // put player y coord
0007: 5@ = 0.0 // put player z coord
0007: 6@ = 0.0 // put player angle

:PSAVEX_80
0001: wait 250 ms 
00D6: if 
0256:   player $PLAYER_CHAR defined 
004D: jump_if_false @PSAVEX_462 
00D6: if 
03EE:   player $PLAYER_CHAR controllable 
004D: jump_if_false @PSAVEX_462 
00D6: if 
0038:   $ONMISSION == 0 
004D: jump_if_false @PSAVEX_432 
00D6: if 
0039:   8@ == 0 
004D: jump_if_false @PSAVEX_178 
0213: 7@ = create_pickup #PICKUPSAVE type 3 at 0@ 1@ 2@ 
0006: 8@ = 1 

:PSAVEX_178
00D6: if 
0214:   pickup 7@ picked_up 
004D: jump_if_false @PSAVEX_425 
0004: $ONMISSION = 1 
01B4: set_player $PLAYER_CHAR frozen_state 0 
03D8: show_save_screen 
0001: wait 0 ms 

:PSAVEX_214
00D6: if 
83D9:   not save_done 
004D: jump_if_false @PSAVEX_238 
0001: wait 0 ms 
0002: jump @PSAVEX_214 

:PSAVEX_238
0169: set_fade_color 0 0 0 
016A: fade 0 1000 ms 
00D6: if 
0256:   player $PLAYER_CHAR defined 
004D: jump_if_false @PSAVEX_284 
0222: set_player $PLAYER_CHAR health_to 200 
01B4: set_player $PLAYER_CHAR frozen_state 0 

:PSAVEX_284
00D6: if 
0256:   player $PLAYER_CHAR defined 
004D: jump_if_false @PSAVEX_370 
0215: destroy_pickup 7@ 
0213: 7@ = create_pickup #PICKUPSAVE type 3 at 0@ 1@ 2@ 
016A: fade 1 1000 ms 
0395: clear_area 1 at 3@ 4@ 5@ radius 1.0 
00A1: put_actor $PLAYER_ACTOR at 3@ 4@ 5@ 
0173: set_actor $PLAYER_ACTOR z_angle_to 6@ 

:PSAVEX_370
00D6: if 
0256:   player $PLAYER_CHAR defined 
004D: jump_if_false @PSAVEX_390 
02EB: restore_camera_with_jumpcut 
0373: set_camera_directly_behind_player 

:PSAVEX_390
0001: wait 500 ms 
00D6: if 
0256:   player $PLAYER_CHAR defined 
004D: jump_if_false @PSAVEX_425 
01B4: set_player $PLAYER_CHAR frozen_state 1 
0004: $ONMISSION = 0 

:PSAVEX_425
0002: jump @PSAVEX_462 

:PSAVEX_432
00D6: if 
0039:   8@ == 1 
004D: jump_if_false @PSAVEX_462 
0215: destroy_pickup 7@ 
0006: 8@ = 0 

:PSAVEX_462
0002: jump @PSAVEX_80