GetPlayerWeaponNames: Difference between revisions
Jump to navigation
Jump to search
Automatyczna aktualizacja dokumentacji funkcji |
Complete Lua function catalog |
||
| Line 26: | Line 26: | ||
* Use these keys with <code>givePlayerItem</code> and <code>setPlayerWeapon</code>. | * Use these keys with <code>givePlayerItem</code> and <code>setPlayerWeapon</code>. | ||
[[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
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.