note Help Needed
This wiki is the result of an ongoing community effort — thank you all for helping!
If you want to provide changes to this page then please click here.
ResetPlayerWeapons
Description
Removes all weapons from a player.
Name | Description |
---|---|
playerid | The ID of the player whose weapons to remove. |
Returns
1 - The function was executed successfully.
0 - The function failed to execute. This means the player specified does not exist.
Examples
public OnPlayerDeath(playerid, killerid, WEAPON:reason)
{
// Remove the killer's weapons
ResetPlayerWeapons(killerid);
return 1;
}
Notes
tip
To remove individual weapons from a player, set their ammo to 0 using SetPlayerAmmo.
Related Functions
- GivePlayerWeapon: Give a player a weapon.
- GetPlayerWeapon: Check what weapon a player is currently holding.
- RemovePlayerWeapon: Remove a specified weapon from a player.