GivePlayerWeapon
From SA-MP Wiki
(Difference between revisions)
Revision as of 09:39, 23 August 2013 Smithy (Talk | contribs) ← Previous diff |
Revision as of 22:11, 1 February 2014 Connor Mead (Talk | contribs) Next diff → |
||
Line 1: | Line 1: | ||
{{Scripting}} | {{Scripting}} | ||
+ | |||
{{Description|Give a player a weapon with a specified amount of ammo.}} | {{Description|Give a player a weapon with a specified amount of ammo.}} | ||
Line 18: | Line 19: | ||
[[Category:Scripting Functions]] | [[Category:Scripting Functions]] | ||
+ | |||
+ | [[fr:GivePlayerWeapon]] |
Revision as of 22:11, 1 February 2014
Description:
Give a player a weapon with a specified amount of ammo.
(playerid, weaponid, ammo)
playerid | The ID of the player to give a weapon to. |
weaponid | The ID of the weapon to give to the player. |
ammo | The amount of ammo to give to the player. |
Return Values:
This function does not return any specific values.
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.
- SetPlayerArmedWeapon: Set a player's armed weapon.
- GetPlayerWeapon: Check what weapon a player is currently holding.