Ok guys so i have this code to remove all guns,
PHP Code:
new EntCount = GetEntityCount();
new String:EdictName[128];
for (new i = 0; i <= EntCount; i++)
{
if (IsValidEntity(i))
{
GetEdictClassname(i, EdictName, sizeof(EdictName));
if (StrContains(EdictName, "weapon_pistol", false) != -1 ||
StrContains(EdictName, "weapon_autoshotgun", false) != -1 ||
StrContains(EdictName, "weapon_hunting_rifle", false) != -1 ||
StrContains(EdictName, "weapon_pistol_magnum", false) != -1 ||
StrContains(EdictName, "weapon_pumpshotgun", false) != -1 ||
StrContains(EdictName, "weapon_rifle", false) != -1 ||
StrContains(EdictName, "weapon_rifle_ak47", false) != -1 ||
StrContains(EdictName, "weapon_rifle_desert", false) != -1 ||
StrContains(EdictName, "weapon_rifle_sg552", false) != -1 ||
StrContains(EdictName, "weapon_rifle_m60", false) != -1 ||
StrContains(EdictName, "weapon_shotgun_chrome", false) != -1 ||
StrContains(EdictName, "weapon_smg", false) != -1 ||
StrContains(EdictName, "weapon_smg_mp5", false) != -1 ||
StrContains(EdictName, "weapon_smg_silenced", false) != -1 ||
StrContains(EdictName, "weapon_sniper_awp", false) != -1 ||
StrContains(EdictName, "weapon_sniper_military", false) != -1 ||
StrContains(EdictName, "weapon_sniper_scout", false) != -1 ||
StrContains(EdictName, "weapon_grenade_launcher", false) != -1 ||
StrContains(EdictName, "weapon_autoshotgun_spawn", false) != -1 )
{
AcceptEntityInput(i, "Kill");
}
And i know this removes all weapons mentioned, what i want to do is remove all weapons other than the ones the players are holding.
Ive looked through a fair amount of threads but none helped.
Any clue on how i would do that?
Thanks for your help.