GetPlayerWeaponNames
Jump to navigation
Jump to search
getPlayerWeaponNames
Returns the stable keys of every melee weapon currently exposed by the server catalog.
Syntax
table getPlayerWeaponNames()
Parameters
This function does not accept parameters.
Returns
Returns an array of weapon key strings.
Examples
List all available melee weapon keys:
for _, weaponKey in ipairs(getPlayerWeaponNames()) do
outputDebugString(weaponKey)
end
Notes
- Available only in server-side resource scripts.
- Use these keys with
givePlayerItemandsetPlayerWeapon.