Quantcast

Jump to content

» «
Photo

[REL | CODE] Weapon Select

8 replies to this topic
Viper187
  • Viper187

    Crazy Snake

  • Members
  • Joined: 17 Oct 2002

#1

Posted 20 June 2005 - 05:58 AM Edited by Viper187, 25 June 2005 - 11:23 PM.

Well, this is a slightly nutty way to do it, but it works. Hold Aim + Jump to spawn a set of weapons/items around you. Press Next Weapon/PRevious weapon to change sets, pickup whatever you want. Jetpack, and Police Bribe are even included. smile.gif

I still haven't figured out how clothes pickups work, or I'd do those too.

CODE

;;this goes with the other thread opcodes in main
004F: create_thread ££SNAKEWS00

;;the rest of this can be put at the bottom of main.

:SNAKEWS00
0001: wait  100 ms
00D6: if  4
80DF:   NOT   actor $PLAYER_ACTOR driving
00E1:   key_pressed  0  6;; aim button
00E1:   key_pressed  0  14;; jump weapon
80E1:   NOT   key_pressed  0  17;; fire
80E1:   NOT   key_pressed  0  4;; action
004D: jump_if_false ££SNAKEWS00
0215: destroy_pickup $SWPICK1
0215: destroy_pickup $SWPICK2
0215: destroy_pickup $SWPICk3
0215: destroy_pickup $SWPICK4
0215: destroy_pickup $SWPICK5
0215: destroy_pickup $SWPICK6
0215: destroy_pickup $SWPICK7
0215: destroy_pickup $SWPICK8
0215: destroy_pickup $SWPICK9
0215: destroy_pickup $SWPICK10
0215: destroy_pickup $SWPICK11
0215: destroy_pickup $SWPICK12
0215: destroy_pickup $SWPICK13
0215: destroy_pickup $SWPICK14
0215: destroy_pickup $SWPICK15
0215: destroy_pickup $SWPICK16

:SNAKEWS01
00D6: if  0
00E1:   key_pressed  0  5;; prev weapon
004D: jump_if_false ££SNAKEWS02
000C: $SWSID -=  1;; integer values
00D6: if  0
001A:    0 > $SWSID;; integer values
004D: jump_if_false ££SNAKEWS20
0004: $SWSID =  2;; integer values
0002: jump ££SNAKEWS20

:SNAKEWS02
00D6: if  0
00E1:   key_pressed  0  7;; next weapon
004D: jump_if_false ££SNAKEWS20
0008: $SWSID +=  1;; integer values
00D6: if  0
0018:   $SWSID >  2;; integer values
004D: jump_if_false ££SNAKEWS20
0004: $SWSID =  0;; integer values
0002: jump ££SNAKEWS20

:SNAKEWS20
00D6: if  0
0038:   $SWSID ==  0;; integer values
004D: jump_if_false ££SNAKEWS21
04C4: create_coordinate @1 @2 @3 from_actor $PLAYER_ACTOR offset  2.0  2.0  0.0
032B: $SWPICK1 = create_weapon_pickup  342  15 ammo  20000 at @1  @2  @3
000B: @2 +=  1.0;; floating-point values
032B: $SWPICK2 = create_weapon_pickup  343  15 ammo  20000 at @1  @2  @3
000B: @2 +=  1.0;; floating-point values
032B: $SWPICK3 = create_weapon_pickup  344  15 ammo  20000 at @1  @2  @3
000B: @2 +=  1.0;; floating-point values
032B: $SWPICK4 = create_weapon_pickup  346  15 ammo  20000 at @1  @2  @3
04C4: create_coordinate @1 @2 @3 from_actor $PLAYER_ACTOR offset  2.0  -2.0  0.0
032B: $SWPICK5 = create_weapon_pickup  347  15 ammo  20000 at @1  @2  @3
000B: @2 +=  1.0;; floating-point values
032B: $SWPICK6 = create_weapon_pickup  348  15 ammo  20000 at @1  @2  @3
000B: @2 +=  1.0;; floating-point values
032B: $SWPICK7 = create_weapon_pickup  349  15 ammo  20000 at @1  @2  @3
000B: @2 +=  1.0;; floating-point values
032B: $SWPICK8 = create_weapon_pickup  350  15 ammo  20000 at @1  @2  @3
04C4: create_coordinate @1 @2 @3 from_actor $PLAYER_ACTOR offset  2.0  -2.0  0.0
032B: $SWPICK9 = create_weapon_pickup  351  15 ammo  20000 at @1  @2  @3
000B: @1 +=  1.0;; floating-point values
032B: $SWPICK10 = create_weapon_pickup  352  15 ammo  20000 at @1  @2  @3
000B: @1 +=  1.0;; floating-point values
032B: $SWPICK11 = create_weapon_pickup  353  15 ammo  20000 at @1  @2  @3
000B: @1 +=  1.0;; floating-point values
032B: $SWPICK12 = create_weapon_pickup  355  15 ammo  20000 at @1  @2  @3
04C4: create_coordinate @1 @2 @3 from_actor $PLAYER_ACTOR offset  -2.0  2.0  0.0
032B: $SWPICK13 = create_weapon_pickup  356  15 ammo  20000 at @1  @2  @3
000B: @1 +=  -1.0;; floating-point values
032B: $SWPICK14 = create_weapon_pickup  357  15 ammo  20000 at @1  @2  @3
000B: @1 +=  -1.0;; floating-point values
032B: $SWPICK15 = create_weapon_pickup  358  15 ammo  20000 at @1  @2  @3
000B: @1 +=  -1.0;; floating-point values
032B: $SWPICK16 = create_weapon_pickup  359  15 ammo  20000 at @1  @2  @3

:SNAKEWS21
00D6: if  0
0038:   $SWSID ==  1;; integer values
004D: jump_if_false ££SNAKEWS22
04C4: create_coordinate @1 @2 @3 from_actor $PLAYER_ACTOR offset  2.0  2.0  0.0
032B: $SWPICK1 = create_weapon_pickup  360  15 ammo  20000 at @1  @2  @3
000B: @2 +=  1.0;; floating-point values
032B: $SWPICK2 = create_weapon_pickup  361  15 ammo  20000 at @1  @2  @3
000B: @2 +=  1.0;; floating-point values
032B: $SWPICK3 = create_weapon_pickup  362  15 ammo  20000 at @1  @2  @3
000B: @2 +=  1.0;; floating-point values
032B: $SWPICK4 = create_weapon_pickup  363  15 ammo  20000 at @1  @2  @3
04C4: create_coordinate @1 @2 @3 from_actor $PLAYER_ACTOR offset  2.0  -2.0  0.0
032B: $SWPICK5 = create_weapon_pickup  365  15 ammo  20000 at @1  @2  @3
000B: @2 +=  1.0;; floating-point values
032B: $SWPICK6 = create_weapon_pickup  366  15 ammo  20000 at @1  @2  @3
000B: @2 +=  1.0;; floating-point values
032B: $SWPICK7 = create_weapon_pickup  367  15 ammo  20000 at @1  @2  @3
000B: @2 +=  1.0;; floating-point values
032B: $SWPICK8 = create_weapon_pickup  368  15 ammo  20000 at @1  @2  @3
04C4: create_coordinate @1 @2 @3 from_actor $PLAYER_ACTOR offset  2.0  -2.0  0.0
032B: $SWPICK9 = create_weapon_pickup  369  15 ammo  20000 at @1  @2  @3
000B: @1 +=  1.0;; floating-point values
032B: $SWPICK10 = create_weapon_pickup  372  15 ammo  20000 at @1  @2  @3
000B: @1 +=  1.0;; floating-point values
032B: $SWPICK11 = create_weapon_pickup  370  15 ammo  20000 at @1  @2  @3
000B: @1 +=  1.0;; floating-point values
0213: $SWPICK12 = create_pickup  321 type  15 at  @1  @2  @3
04C4: create_coordinate @1 @2 @3 from_actor $PLAYER_ACTOR offset  -2.0  2.0  0.0
0213: $SWPICK13 = create_pickup  322 type  15 at  @1  @2  @3
000B: @1 +=  -1.0;; floating-point values
0213: $SWPICK14 = create_pickup  323 type  15 at  @1  @2  @3
000B: @1 +=  -1.0;; floating-point values
0213: $SWPICK15 = create_pickup  324 type  15 at  @1  @2  @3
000B: @1 +=  -1.0;; floating-point values
0213: $SWPICK16 = create_pickup  325 type  15 at  @1  @2  @3

:SNAKEWS22
00D6: if  0
0038:   $SWSID ==  2;; integer values
004D: jump_if_false ££SNAKEWS30
04C4: create_coordinate @1 @2 @3 from_actor $PLAYER_ACTOR offset  2.0  2.0  0.0
0213: $SWPICK1 = create_pickup  326 type  15 at  @1  @2  @3
000B: @2 +=  1.0;; floating-point values
0213: $SWPICK2 = create_pickup  327 type  15 at  @1  @2  @3
000B: @2 +=  1.0;; floating-point values
0213: $SWPICK3 = create_pickup  328 type  15 at  @1  @2  @3
000B: @2 +=  1.0;; floating-point values
0213: $SWPICK4 = create_pickup  331 type  15 at  @1  @2  @3
04C4: create_coordinate @1 @2 @3 from_actor $PLAYER_ACTOR offset  2.0  -2.0  0.0
0213: $SWPICK5 = create_pickup  333 type  15 at  @1  @2  @3
000B: @2 +=  1.0;; floating-point values
0213: $SWPICK6 = create_pickup  334 type  15 at  @1  @2  @3
000B: @2 +=  1.0;; floating-point values
0213: $SWPICK7 = create_pickup  335 type  15 at  @1  @2  @3
000B: @2 +=  1.0;; floating-point values
0213: $SWPICK8 = create_pickup  336 type  15 at  @1  @2  @3
04C4: create_coordinate @1 @2 @3 from_actor $PLAYER_ACTOR offset  2.0  -2.0  0.0
0213: $SWPICK9 = create_pickup  337 type  15 at  @1  @2  @3
000B: @1 +=  1.0;; floating-point values
0213: $SWPICK10 = create_pickup  338 type  15 at  @1  @2  @3
000B: @1 +=  1.0;; floating-point values
0213: $SWPICK11 = create_pickup  339 type  15 at  @1  @2  @3
000B: @1 +=  1.0;; floating-point values
0213: $SWPICK12 = create_pickup  341 type  15 at  @1  @2  @3
04C4: create_coordinate @1 @2 @3 from_actor $PLAYER_ACTOR offset  -2.0  2.0  0.0
0213: $SWPICK13 = create_pickup  #BODYARMOUR type  15 at  @1  @2  @3
000B: @1 +=  -1.0;; floating-point values
0213: $SWPICK14 = create_pickup  #BRIBE type  15 at  @1  @2  @3
000B: @1 +=  -1.0;; floating-point values
0213: $SWPICK15 = create_pickup  #HEALTH type  15 at  @1  @2  @3
000B: @1 +=  -1.0;; floating-point values
;;0213: $SWPICK16 = create_pickup  #CLOTHESP type  15 at  @1  @2  @3

:SNAKEWS30
0002: jump ££SNAKEWS00

perkin
  • perkin

    Techdog

  • Members
  • Joined: 08 Sep 2004

#2

Posted 20 June 2005 - 02:38 PM

Great! thanks.

Ha, we can pick up clothes? interesting...I thought I can only do that through assigning to wardrobe.

Viper187
  • Viper187

    Crazy Snake

  • Members
  • Joined: 17 Oct 2002

#3

Posted 20 June 2005 - 02:49 PM

QUOTE (perkin @ Jun 20 2005, 14:38)
Great! thanks.

Ha, we can pick up clothes? interesting...I thought I can only do that through assigning to wardrobe.

Yeah, you can. I've only seen it happen on that mission you have to impersonate a valet.

Viper187
  • Viper187

    Crazy Snake

  • Members
  • Joined: 17 Oct 2002

#4

Posted 23 June 2005 - 02:27 PM

New version. This one uses the same keys but only spawns 1 weapon at a time in front of you. Uses less code too.

CODE

:SNAKEWS00
0001: wait  100 ms
00D6: if  4
80DF:   NOT   actor $PLAYER_ACTOR driving
00E1:   key_pressed  0  6;; aim button
00E1:   key_pressed  0  14;; jump weapon
80E1:   NOT   key_pressed  0  17;; fire
80E1:   NOT   key_pressed  0  4;; action
004D: jump_if_false ££SNAKEWS00

:SNAKEWS01
00D6: if  0
00E1:   key_pressed  0  5;; prev weapon
004D: jump_if_false ££SNAKEWS02
000C: $SWSID -=  1;; integer values

:SNAKEWS02
00D6: if  0
00E1:   key_pressed  0  7;; next weapon
004D: jump_if_false ££SNAKEWS02B
0008: $SWSID +=  1 ;; integer values

:SNAKEWS02B
00D6: if  25
0038:   $SWSID ==  329 ;; integer values
0038:   $SWSID ==  332 ;; integer values
0038:   $SWSID ==  340 ;; integer values
0038:   $SWSID ==  345 ;; integer values
0038:   $SWSID ==  354 ;; integer values
0038:   $SWSID ==  364 ;; integer values
004D: jump_if_false ££SNAKEWS03
00D6: if  0
00E1:   key_pressed  0  5;; prev weapon
004D: jump_if_false ££SNAKEWS02C
000C: $SWSID -=  1;; integer values
0002: jump ££SNAKEWS03

:SNAKEWS02C
0008: $SWSID +=  1 ;; integer values

:SNAKEWS03
00D6: if  0
001A:    321 > $SWSID ;; integer values
004D: jump_if_false ££SNAKEWS03B
0004: $SWSID =  373 ;; integer values
0002: jump ££SNAKEWS10

:SNAKEWS03B
00D6: if  0
0018:   $SWSID >  373 ;; integer values
004D: jump_if_false ££SNAKEWS03C
0004: $SWSID =  321 ;; integer values
0002: jump ££SNAKEWS10

:SNAKEWS03C
00D6: if  2
0018:   $SWSID >  341 ;; integer values
8038:   NOT    $SWSID ==  371 ;; integer values
8038:   NOT    $SWSID ==  373 ;; integer values
004D: jump_if_false ££SNAKEWS10
0002: jump ££SNAKEWS11

:SNAKEWS10
0215: destroy_pickup $SWPICK1
04C4: create_coordinate @1 @2 @3 from_actor $PLAYER_ACTOR offset  0.0  2.0  0.0
0213: $SWPICK1 = create_pickup  $SWSID type  15 at  @1  @2  @3
0002: jump ££SNAKEWS00

:SNAKEWS11
0215: destroy_pickup $SWPICK1
04C4: create_coordinate @1 @2 @3 from_actor $PLAYER_ACTOR offset  0.0  2.0  0.0
032B: $SWPICK1 = create_weapon_pickup  $SWSID  15 ammo  20000 at @1  @2  @3
0002: jump ££SNAKEWS00


RainingAcid
  • RainingAcid

    Hustler

  • Members
  • Joined: 28 Mar 2005

#5

Posted 13 July 2005 - 10:30 PM

Mind if I include this in my farewell mod?

brotherbozar
  • brotherbozar

    Rat

  • Members
  • Joined: 16 Jul 2005

#6

Posted 25 July 2005 - 08:56 PM Edited by brotherbozar, 26 July 2005 - 09:26 PM.

I love this idea, its a real cheat but it's great. It brings to mind an assassin type character who can always evade the law and get away. I'd like to see a version without the bribe but just using a cloths change to reduce your wanted level. Kind of assassins tools:
A 'robbing' outfit': Balaclava and any dark clothes you see fit, maybe black windcheater and some dark jeans or joggers, maybe leather jeans. And some black sneakers.
Just a couple of weapons suitable for a stealthy guy: the silenced pistol, MP5 and satchel charges.
And a couple of other changes of clothes including tweed suit and dark shades or rimmed shades from DS, and just green jeans, some sneakers and T shirt.
But of course with the emphasis on the fact that a change of clothes will lower your wanted level, i love the idea of nipping down an alley and changing my clothes like superman...LOL, sounds pervy.
So consider this a MOD REQUEST ...please!

Oh...and the age old question, where do i put this code please i really want to try this out. Thanks ..great stuff.
EDIT: Ok i must be blind, didn't see the instuctions thanks blush.gif

jamienosdude
  • jamienosdude

    Rat

  • Members
  • Joined: 11 Jan 2005

#7

Posted 31 July 2005 - 11:49 AM

QUOTE (brotherbozar @ Jul 25 2005, 20:56)
I love this idea, its a real cheat but it's great. It brings to mind an assassin type character who can always evade the law and get away. I'd like to see a version without the bribe but just using a cloths change to reduce your wanted level. Kind of assassins tools:
A 'robbing' outfit': Balaclava and any dark clothes you see fit, maybe black windcheater and some dark jeans or joggers, maybe leather jeans. And some black sneakers.
Just a couple of weapons suitable for a stealthy guy: the silenced pistol, MP5 and satchel charges.
And a couple of other changes of clothes including tweed suit and dark shades or rimmed shades from DS, and just green jeans, some sneakers and T shirt.
But of course with the emphasis on the fact that a change of clothes will lower your wanted level, i love the idea of nipping down an alley and changing my clothes like superman...LOL, sounds pervy.
So consider this a MOD REQUEST ...please!

Oh...and the age old question, where do i put this code please i really want to try this out. Thanks ..great stuff.
EDIT: Ok i must be blind, didn't see the instuctions thanks blush.gif

theres a tutorial by craig in this forum at link http://www.gtaforums...0

thanks to him i know how to do it

brotherbozar
  • brotherbozar

    Rat

  • Members
  • Joined: 16 Jul 2005

#8

Posted 31 July 2005 - 03:21 PM

Thanks dude, that'll be very helpful wink.gif

jamienosdude
  • jamienosdude

    Rat

  • Members
  • Joined: 11 Jan 2005

#9

Posted 31 July 2005 - 03:24 PM

Also.. heres the url if you cant be bothered to scroll down to his post http://www.gtaforums...dpost&p=1782668

Really, why isent his post stickied it would stop alot of people asking where to insert the code's posted here tounge.gif




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users