SetPlayerWeaponAmmo

From GT-MP
Jump to: navigation, search
SetPlayerWeaponAmmo
Server-Side Function
Utilities-terminal.png Server-Side Csharp.png C#

Sets the amount of ammo in the weapon of the player.

Syntax

In C#
Server-Side Function

API.setPlayerWeaponAmmo(Client player, WeaponHash weapon, int ammo);

Required Arguments

  • player: parameter input should be in Client type.
  • weapon: parameter input should be in WeaponHash type.
  • ammo: parameter input should be in int type.
Dialog-warning.png Note: This feature is currently not in the API, or is currently not accurate on the wiki due to upcoming API changes. New API functions and changes will be released with the next update.

NOTE: This function returns data in bool type.

Usage example(s)

API.setPlayerWeaponAmmo(player, WeaponHash.SMG, 500);

Changelog

Version Description
1.0 Release.

References