Weapons: Difference between revisions
Jump to navigation
Jump to search
JessePinkman (talk | contribs) (Add table with weapon IDs grouped by slot) |
(add see also) |
||
Line 162: | Line 162: | ||
==Server Function== | ==Server Function== | ||
{{Weapon functions}} | {{Weapon functions}} | ||
== See Also == | |||
* [[Id|Ids]] | |||
[[Category:ID Lists]] | [[Category:ID Lists]] |
Revision as of 07:07, 1 January 2022
Scripting functions that ask for a weapon ID need an integer that refers to the GTASA weapon ID list. They are listed below.
Lua table of all weapon IDs
local weapons = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 22, 23, 24, 25, 26, 27, 28, 29, 32, 30, 31, 33, 34, 35, 36, 37, 38, 16, 17, 18, 39, 41, 42, 43, 10, 11, 12, 14, 15, 44, 45, 46, 40}
Lua table of all weapon IDs grouped by slot
local weapons = { [0] = {0, 1}, -- Hand [1] = {2, 3, 4, 5, 6, 7, 8, 9}, -- Melee [2] = {22, 23, 24}, -- Handguns [3] = {25, 26, 27}, -- Shotguns [4] = {28, 29, 32}, -- Sub-Machine Guns [5] = {30, 31}, -- Assault Rifles [6] = {33, 34}, -- Rifles [7] = {35, 36, 37, 38}, -- Heavy Weapons [8] = {16, 17, 18, 39}, -- Projectiles [9] = {41, 42, 43}, -- Special 1 [10] = {10, 11, 12, 14, 15}, -- Gifts [11] = {44, 45, 46}, -- Special 2 [12] = {40} -- Satchel Detonator }
Client Functions
- Shared
- getWeaponProperty
- getPickupWeapon
- getOriginalWeaponProperty
- getSlotFromWeapon
- getWeaponIDFromName
- getWeaponNameFromID
- setWeaponAmmo
- setWeaponProperty
Server Function
- getWeaponProperty
- getPickupWeapon
- getOriginalWeaponProperty
- getSlotFromWeapon
- getWeaponIDFromName
- getWeaponNameFromID
- setWeaponAmmo
- setWeaponProperty