Difference between revisions of "Clothes pickup"

From GTAMods Wiki
Jump to navigation Jump to search
(code snippet)
 
Line 3: Line 3:
 
:CLOTHES
 
:CLOTHES
 
03A4: name_thread 'CLOTHES'  
 
03A4: name_thread 'CLOTHES'  
055B: 1@ = create_clothes_pickup 13 at 0.0 0.0 0.0 // set your pickup location
+
055B: 0@ = create_clothes_pickup 13 at 0.0 0.0 0.0 // set your pickup location
  
 
:CLOTHES_34
 
:CLOTHES_34
 
0001: wait 0 ms  
 
0001: wait 0 ms  
 
00D6: if  
 
00D6: if  
0038:  0@ == 0
+
0038:  $1180 == 0
004D: jump_if_false @CLOTHES_115
+
004D: jump_if_false @CLOTHES_34
 
00D6: if  
 
00D6: if  
0214:  pickup 1@ picked_up  
+
0214:  pickup 0@ picked_up  
 
004D: jump_if_false @CLOTHES_115  
 
004D: jump_if_false @CLOTHES_115  
 
0050: gosub @CLOTHES_122  
 
0050: gosub @CLOTHES_122  
Line 26: Line 26:
 
//add more pickups by copying and pasting this section, remember to make adjustments and corrections
 
//add more pickups by copying and pasting this section, remember to make adjustments and corrections
 
00D6: if  
 
00D6: if  
0214:  pickup 2@ picked_up // change pickup handle
+
0214:  pickup 1@ picked_up // change pickup handle
 
004D: jump_if_false @Second_Pickup_End // change jump-to-skip
 
004D: jump_if_false @Second_Pickup_End // change jump-to-skip
 
0050: gosub @CLOTHES_122  
 
0050: gosub @CLOTHES_122  
Line 42: Line 42:
  
 
:CLOTHES_122
 
:CLOTHES_122
0004: 0@ = 1
+
0004: $1180 = 1
 
00D6: if  
 
00D6: if  
 
0256:  player $PLAYER_CHAR defined  
 
0256:  player $PLAYER_CHAR defined  
Line 60: Line 60:
  
 
:CLOTHES_191
 
:CLOTHES_191
0004: 0@ = 0
+
0004: $1180 = 0
  
 
:CLOTHES_198
 
:CLOTHES_198
Line 71: Line 71:
  
 
:CLOTHES_235
 
:CLOTHES_235
0004: 0@ = 0
+
0004: $1180 = 0
  
 
:CLOTHES_242
 
:CLOTHES_242
Line 95: Line 95:
 
:CLOTHES_313
 
:CLOTHES_313
 
01B4: set_player $PLAYER_CHAR frozen_state 1  
 
01B4: set_player $PLAYER_CHAR frozen_state 1  
0004: 0@ = 0
+
0004: $1180 = 0
 
016A: fade 1 500 ms  
 
016A: fade 1 500 ms  
 
03E5: text_box 'CLOHELP'  // Clean Clothes!!
 
03E5: text_box 'CLOHELP'  // Clean Clothes!!
Line 101: Line 101:
  
 
:CLOTHES_351
 
:CLOTHES_351
0004: 0@ = 0
+
0004: $1180 = 0
  
 
:CLOTHES_358
 
:CLOTHES_358

Revision as of 17:47, 29 January 2010

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: 0@ = create_clothes_pickup 13 at 0.0 0.0 0.0 // set your pickup location

:CLOTHES_34
0001: wait 0 ms 
00D6: if 
0038:   $1180 == 0
004D: jump_if_false @CLOTHES_34
00D6: if 
0214:   pickup 0@ 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 1@ 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: $1180 = 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: $1180 = 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: $1180 = 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: $1180 = 0
016A: fade 1 500 ms 
03E5: text_box 'CLOHELP'  // Clean Clothes!!
0002: jump @CLOTHES_358 

:CLOTHES_351
0004: $1180 = 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.