GetPlayerWeapon: Difference between revisions
From Onset Developer Wiki
No edit summary |
FlyingFork (talk | contribs) No edit summary |
||
Line 14: | Line 14: | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua"> | |||
print("Weapon: " .. GetPlayerWeapon(player)) | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
* [[SetPlayerWeapon]] | * [[SetPlayerWeapon]] |
Latest revision as of 14:49, 26 June 2021
Description
Returns the specified player's weapon id, ammo, ammo in magazine in the specified weapon slot.
Syntax
GetPlayerWeapon(player [, weaponslot])
Client Syntax
GetPlayerWeapon(weaponslot)
Parameters
- player
The player identifier. - weaponslot (optional)
The weapon slot.
Return Value
- Returns weapon id, ammo.
Client Return Value
- Returns weapon id, ammo, ammo in magazine.
Example
print("Weapon: " .. GetPlayerWeapon(player))