Stop players from buying but not from picking.
I want to know what to do that this code would be only that players who don't have ADMIN_LEVEL_H coudn't buy awp, sg550, g3sg1. But they could pick it up if someone drop it.
PHP Code:
public event_CurAWP(id)
{
get_mapname( mapname, charsmax(mapname) );
if ( equali(mapname, "awp_india") || equali(mapname, "awp_dust") || equali(mapname, "cs_deagle5") )
return PLUGIN_CONTINUE;
if(read_data(2) == CSW_AWP)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
client_print(id, print_center, "Sniper's only for VIP's")
client_cmd(id, "drop")
}
}
return PLUGIN_HANDLED
}
public event_CurSG550(id)
{
get_mapname( mapname, charsmax(mapname) );
if ( equali(mapname, "awp_india") || equali(mapname, "awp_dust") || equali(mapname, "cs_deagle5") )
return PLUGIN_CONTINUE;
if(read_data(2) == CSW_SG550)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
client_print(id, print_center, "Sniper's only for VIP's")
client_cmd(id, "drop")
}
&nbs p; }
return PLUGIN_HANDLED
}
public event_CurG3SG1(id)
{
get_mapname( mapname, charsmax(mapname) );
if ( equali(mapname, "awp_india") || equali(mapname, "awp_dust") || equali(mapname, "cs_deagle5") )
return PLUGIN_CONTINUE;
if(read_data(2) == CSW_G3SG1)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
client_print(id, print_center, "Sniper's only for VIP's")
client_cmd(id, "drop")
&n bsp; }
}
return PLUGIN_HANDLED
}
Orignal From: Stop players from buying but not from picking.
Post a Comment