- Documentation
- Shared functions
- isValidWeaponID
Function
isValidWeaponID
Checks whether an ID is a weapon used in the game (0-46, skipping unused numbers).
Syntax
bool isValidWeaponID(int weapon)Arguments
weaponint- The ID to check.
Returns
true for a real weapon.
Example
if isValidWeaponID(tonumber(arg)) then
giveWeapon(player, tonumber(arg), 100)
end