GetJetpackWeaponsEnabled
Jump to navigation
Jump to search
This function returns all the weapons that are usable on a jetpack similar to getJetpackWeaponEnabled.
Syntax
table getJetpackWeaponsEnabled()
Returns
Returns a table filled with weapon names, else an empty table.
Code
Click to collapse [-]
Serverfunction getJetpackWeaponsEnabled() local enabled = {} for i=0, 46 do local wepName = getWeaponNameFromID(i) if getJetpackWeaponEnabled(wepName) then table.insert(enabled,wepName) end end return enabled end
Example
addCommandHandler("weps",function() for _,v in ipairs(getJetpackWeaponsEnabled())do outputChatBox(v) outputConsole(v) outputDebugString(v) end end)