From SA-MP Wiki

Jump to: navigation, search


Give a player a weapon with a specified amount of ammo.

(playerid, weaponid, ammo)
playeridThe ID of the player to give a weapon to.
weaponidThe ID of the weapon to give to the player.
ammoThe amount of ammo to give to the player.

Return Values:

  • 1: The function executed successfully.
  • 0: The function failed to execute. This means the player is not connected.

GivePlayerWeapon(playerid, 26, 64); // Give playerid a sawn-off shotgun with 64 ammo

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

Personal tools
In other languages