GetPlayerWeapons

From RAGE Multiplayer Wiki
Revision as of 13:29, 27 November 2019 by Muphy (talk | contribs) (Created page with "Returns an array of weapon hashes that contains all the weapons the player is currently holding. ==Syntax== <syntaxhighlight lang="C#" >WeaponHash[] NAPI.Player.GetPlayerWeap...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Returns an array of weapon hashes that contains all the weapons the player is currently holding.

Syntax

WeaponHash[] NAPI.Player.GetPlayerWeapons(Client player);

Required Arguments

  • player: parameter input should be in Client type.

NOTE: This function returns data in WeaponHash[] type.

Usage example(s)

Example Description

WeaponHash[] playerWeapons = NAPI.Player.GetPlayerWeapons(player);

foreach(WeaponHash weapon in playerWeapons) {
   // will loop through all player's weapons.
}