Weapons
Jump to navigation
Jump to search
Scripting functions that ask for a weapon ID need an integer that refers to the GTASA weapon ID list. They are listed below.
Lua tables with weapons:
local weaponsID = {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, 13, 14, 15, 44, 45, 46, 40} local weaponsBySlot = { [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, 13, 14, 15}, -- gifts [11] = {44, 45, 46}, -- special 2 [12] = {40}, -- satchel detonator }
Functions
- giveWeapon
- takeAllWeapons
- takeWeapon
- Shared
- getWeaponProperty
- getPickupWeapon
- getOriginalWeaponProperty
- getSlotFromWeapon
- getWeaponIDFromName
- getWeaponNameFromID
- setWeaponAmmo
- setWeaponProperty