StripWeapons

Syntax

enum /* Weapon types */
{
	Primary = 1
	, Secondary
	, Knife
	, Grenades
	, C4
};


stock StripWeapons(id, Type, bool: bSwitchIfActive = true)

Usage

id:
Player id
type:
Weapon type (check enum below for types)
bSwitchIfActive:
Switch to other weapon before stripping
if stripped weapon is currently deployed

Description

Strips a player's weapon based on type.

Return

: 1 on success, otherwise 0

Ex:  StripWeapons(id, Secondary);    // Strips secondary weapon with switching if deployed.
     StripWeapons(iPlayer, C4, false);   // Strips c4 without switching if deployed.