GetPlayerRangedWeaponNames: Difference between revisions
Jump to navigation
Jump to search
Update Lua API reference |
Complete Lua function catalog |
||
| Line 26: | Line 26: | ||
* Use returned keys with authoritative inventory and equipment functions. | * Use returned keys with authoritative inventory and equipment functions. | ||
[[Category:Lua Functions]] | |||
[[Category:Server Functions]] | [[Category:Server Functions]] | ||
[[Category:Inventory Functions]] | [[Category:Inventory Functions]] | ||
[[Category:Equipment Functions]] | [[Category:Equipment Functions]] | ||
Latest revision as of 09:53, 15 August 2026
getPlayerRangedWeaponNames
Returns every stable ranged-weapon key exposed by the authoritative item catalog.
Syntax
table getPlayerRangedWeaponNames()
Parameters
This function does not accept parameters.
Returns
Returns a one-based array of ranged-weapon key strings.
Examples
List ranged weapons available to resources:
for _, weaponKey in ipairs(getPlayerRangedWeaponNames()) do
outputDebugString(weaponKey)
end
Notes
- Available only in server-side resource scripts.
- Use returned keys with authoritative inventory and equipment functions.