Clothes pickup

From GTAMods Wiki
Revision as of 16:50, 29 January 2010 by Spaceeinstein (talk | contribs) (code snippet)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This is a code snippet for a clothes pickup in Sanny Builder's format for Vice City. This code is based on the clothes pickups in Vice City. Even the "no fall off bike" glitch works.

:CLOTHES
03A4: name_thread 'CLOTHES' 
055B: 1@ = create_clothes_pickup 13 at 0.0 0.0 0.0 // set your pickup location

:CLOTHES_34
0001: wait 0 ms 
00D6: if 
0038:   0@ == 0
004D: jump_if_false @CLOTHES_115 
00D6: if 
0214:   pickup 1@ picked_up 
004D: jump_if_false @CLOTHES_115 
0050: gosub @CLOTHES_122 
00D6: if 
0256:   player $PLAYER_CHAR defined 
004D: jump_if_false @CLOTHES_108 
0352: set_actor $PLAYER_ACTOR skin_to 'PLAYER' // set your character, see list of special actors (023C)

:CLOTHES_108
0050: gosub @CLOTHES_244 

:CLOTHES_115
{
//add more pickups by copying and pasting this section, remember to make adjustments and corrections
00D6: if 
0214:   pickup 2@ picked_up // change pickup handle
004D: jump_if_false @Second_Pickup_End // change jump-to-skip
0050: gosub @CLOTHES_122 
00D6: if 
0256:   player $PLAYER_CHAR defined 
004D: jump_if_false @Second_Pickup_Gosub // change jump-to-gosub
0352: set_actor $PLAYER_ACTOR skin_to 'PLAYER' // set your character, see list of special actors (023C)

:Second_Pickup_Gosub // change jump-to-gosub label
0050: gosub @CLOTHES_244 

:Second_Pickup_End // change jump-to-skip label
}
0002: jump @CLOTHES_34 

:CLOTHES_122
0004: 0@ = 1
00D6: if 
0256:   player $PLAYER_CHAR defined 
004D: jump_if_false @CLOTHES_191 
0169: set_fade_color 0 0 1 
016A: fade 0 500 ms 

:CLOTHES_160
00D6: if 
016B:   fading 
004D: jump_if_false @CLOTHES_184 
0001: wait 0 ms 
0002: jump @CLOTHES_160 

:CLOTHES_184
0002: jump @CLOTHES_198 

:CLOTHES_191
0004: 0@ = 0

:CLOTHES_198
00D6: if 
0256:   player $PLAYER_CHAR defined 
004D: jump_if_false @CLOTHES_235 
03BF: set_player $PLAYER_CHAR ignored_by_everyone_to 1 
01B4: set_player $PLAYER_CHAR frozen_state 0 
0002: jump @CLOTHES_242 

:CLOTHES_235
0004: 0@ = 0

:CLOTHES_242
0051: return 

:CLOTHES_244
00D6: if 
0256:   player $PLAYER_CHAR defined 
004D: jump_if_false @CLOTHES_351 
038B: load_requested_models 
00D6: if 
0256:   player $PLAYER_CHAR defined 
004D: jump_if_false @CLOTHES_283 
0353: refresh_actor $PLAYER_ACTOR 

:CLOTHES_283
03BF: set_player $PLAYER_CHAR ignored_by_everyone_to 0 
00D6: if 
810F:   not player $PLAYER_CHAR wanted_level > 2 
004D: jump_if_false @CLOTHES_313 
0110: clear_player $PLAYER_CHAR wanted_level 

:CLOTHES_313
01B4: set_player $PLAYER_CHAR frozen_state 1 
0004: 0@ = 0
016A: fade 1 500 ms 
03E5: text_box 'CLOHELP'  // Clean Clothes!!
0002: jump @CLOTHES_358 

:CLOTHES_351
0004: 0@ = 0

:CLOTHES_358
0051: return

Look here for a list of available characters. Open the GXT file and search for OUTFT13 to edit the name of the clothing pickup.