Weapon::getWeaponClipSize

From RAGE Multiplayer Wiki
Revision as of 11:15, 28 April 2024 by Shr0x (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Client-Side
Function

 JavaScript



JavaScript Syntax

Returns the clip size of given weapon hash.

Required Params

Return Value

  • Number

Syntax

mp.game.weapon.getWeaponClipSize(weaponHash);

Example

const { weapon } = mp.players.local; //get the weapon from local players
if (weapon !== mp.game.joaat("weapon_unarmed")) {
	const clipSize = mp.game.weapon.getWeaponClipSize(weapon);
	mp.console.logInfo(`Current player weapon clip size is ${clipSize}`);
}



See also