PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <colorchat>
#include <hamsandwich>
#include <cstrike>
#include <engine>
#include <fun>
#define PLUGIN "Scoutzknivez"
#define VERSION "1.0"
#define AUTHOR "Bilal"
new Prefix[] = "[AoD]"
new g_maxplayers
new bool: Hasgame1
new bool: Hasgame2
new bool: Hasgame3
new bool: Hasgame4
new bool: Hasgame5
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_logevent("Cmdroundstart", 2, "1=Round_Start")
register_logevent("Cmdroundend", 2, "1=Round_End")
RegisterHam(Ham_Spawn, "player", "Cmdspawn", 1)
RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_scout", "Cmdnoscope")
g_maxplayers = get_maxplayers()
}
public Cmdspawn(id)
{
if (Hasgame1)
{
strip_user_weapons(id)
set_task(0.5, "Cmdheadshot", id)
set_user_hitzones(id, 0, 2)
}
else if (Hasgame2)
{
strip_user_weapons(id)
set_task(0.5, "Cmdnoscopeday", id)
}
else if (Hasgame3)
{
strip_user_weapons(id)
set_task(0.5, "Cmdknife", id)
}
else if (Hasgame4)
{
strip_user_weapons(id)
set_task(0.5, "Cmdnormal", id)
}
else if (Hasgame5)
{
strip_user_weapons(id)
set_task(0.5, "Cmdnormal", id)
}
Hasgame1 = false
Hasgame2 = false
Hasgame3 = false
Hasgame4 = false
Hasgame5 = false
}
public Cmdroundstart()
{
new Roll = random_num(1, 5)
for (new i = 1; i <=g_maxplayers; i++)
{
switch (Roll)
{
case 1:
{
Hasgame1 = true
strip_user_weapons(i)
set_task(0.5, "Cmdheadshot", i)
set_user_hitzones(i, 0, 2)
ColorChat(i, GREY, "%s ^1The round: ^4Headshot only!", Prefix)
}
case 2:
{
Hasgame2 = true
strip_user_weapons(i)
set_task(0.5, "Cmdnoscopeday", i)
ColorChat(i, GREY, "%s ^1The round: ^4Noscope only!", Prefix)
}
case 3:
{
Hasgame3 = true
strip_user_weapons(i)
set_task(0.5, "Cmdknife", i)
ColorChat(i, GREY, "%s ^1The round: ^4Knife only!", Prefix)
}
case 4:
{
Hasgame4 = true
strip_user_weapons(i)
set_task(0.5, "Cmdnormal", i)
ColorChat(i, GREY, "%s ^1The round: ^4Normal!", Prefix)
}
case 5:
{
Hasgame5 = true
strip_user_weapons(i)
set_lights("c")
set_task(0.5, "Cmdnormal", i)
ColorChat(i, GREY, "%s ^1The round: ^4Night n seeK!", Prefix)
}
}
}
}
public Cmdroundend()
{
set_lights("m")
}
public Cmdheadshot(id)
{
strip_user_weapons(id)
give_item(id, "weapon_scout")
cs_set_user_bpammo(id, CSW_SCOUT, 30)
}
public Cmdnoscopeday(id)
{
strip_user_weapons(id)
give_item(id, "weapon_scout")
cs_set_user_bpammo(id, CSW_SCOUT, 30)
}
public Cmdknife(id)
{
strip_user_weapons(id)
give_item(id, "weapon_knife")
}
public Cmdnormal(id)
{
strip_user_weapons(id)
give_item(id, "weapon_knife")
give_item(id, "weapon_scout")
}
public Cmdnoscope(const entity)
{
return Hasgame2 ? HAM_SUPERCEDE : HAM_IGNORED
}
It doesnt strip the guns / give the guns to the people? why not. What is the problem?