• Home
  • FAQ
  • Servers
  • Docs
  • Blog
  • Englishاللغة العربيةবাংলাbosanski jezikDeutschΕλληνικάEspañoleestiFrançaishrvatski jezikmagyarBahasa IndonesiaItaliano日本語ქართულიlietuvių kalbaNederlandsNorskjęzyk polskiPortuguêsRomânăРусскийсрпски језикไทยTürkçeУкраїнськаاردوTiếng Việt简体中文繁體中文

GivePlayerWeapon

Description

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

NameDescription
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.

Returns

1: The function was executed successfully.

0: The function failed to execute. This means the player is not connected.

Examples

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

Related Functions

  • SetPlayerArmedWeapon: Set a player's armed weapon.
  • GetPlayerWeapon: Check what weapon a player is currently holding.

Community

  • Discord
  • Instagram
  • Twitter
  • Facebook
  • VK

More

  • SA-MP
  • Blog
  • GitHub