Difference between revisions of "0490"
Jump to navigation
Jump to search
(Created page with "{{Icon|VC}} '''HAS_PLAYER_GOT_WEAPON''' <hr /> '''Description''' : Checks if the player has the specified weapon '''Syntax''' : 0490: player [''player handle''] has_wea...") |
|||
Line 11: | Line 11: | ||
:: [[Weapon#Vice City|Weapon number]] | :: [[Weapon#Vice City|Weapon number]] | ||
− | This conditional opcode returns true if you have the specified weapon. It will remain true if you run out of ammo for that weapon and have not replaced it with another weapon of the same group unless you are wasted or busted. This is [[List of unsupported opcodes|unsupported]] in [[San Andreas]] and is superseded by opcode [[0491]]. | + | This conditional opcode returns true if you have the specified weapon. It will remain true if you run out of ammo for that weapon and have not replaced it with another weapon of the same group unless you are wasted or busted. Do not use weapon number ''0'' because it does not actually check if you have a fist so it produces a meaningless result. This opcode is [[List of unsupported opcodes|unsupported]] in [[San Andreas]] and is superseded by opcode [[0491]]. |
== Keywords == | == Keywords == |
Revision as of 07:04, 29 July 2015
Description
- Checks if the player has the specified weapon
Syntax
- 0490: player [player handle] has_weapon [int]
Parameter
- [player handle]
- [int]
This conditional opcode returns true if you have the specified weapon. It will remain true if you run out of ammo for that weapon and have not replaced it with another weapon of the same group unless you are wasted or busted. Do not use weapon number 0 because it does not actually check if you have a fist so it produces a meaningless result. This opcode is unsupported in San Andreas and is superseded by opcode 0491.
Keywords
has, player, got, weapon