Description:
Give a player a weapon with a specified amount of ammo.
Parameters:
(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:
1: The function executed successfully.
0: The function failed to execute. This means the player is not connected.
Give a player a weapon with a specified amount of ammo.
Parameters:
(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:
1: The function executed successfully.
0: The function failed to execute. This means the player is not connected.
- Código:
GivePlayerWeapon(playerid, 26, 64); // Give playerid a sawn-off shotgun with 64 ammo
Creditos: WIKI SA-MP