ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. getWeaponClipAmmo

Function

getWeaponClipAmmo

ServerWeaponsIdentical to MTA:SA

Returns the number of rounds in a scripted weapon's clip.

Syntax

int getWeaponClipAmmo(weapon weapon)

Arguments

weaponweapon
The scripted weapon.

Returns

Rounds in the clip or false.

Example

if getWeaponClipAmmo(turret) == 0 then
    setWeaponState(turret, "reloading")
end

See also