Ugrás a fő tartalomhoz

GivePlayerWeapon

Description

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

NameDescription
playeridThe ID of the player to give a weapon to.
WEAPON: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, WEAPON_SAWEDOFF, 64); // Give playerid a sawn-off shotgun with 64 ammo