PHP Code:
public WeaponsMenu_Handler(id, key)
{
if(get_user_team(id) !=1)
{
ColorChat(id,RED, "^x03[Boom` Shop]^x01 You must be^x04 Terror")
return PLUGIN_HANDLED;
}
if(!is_user_alive(id))
{
ColorChat(id, RED, "^x03[Boom` Shop]^x01 You must be alive!");
return PLUGIN_HANDLED;
}
new user_money = cs_get_user_money_ul(id);
switch(key) {
case 0: {
if(user_has_weapon(id, CSW_AWP)){
ColorChat(id, RED, "^x03[Boom` Shop]^x01 You already have ^x04 Awp^x01.");
return PLUGIN_HANDLED;
}
new cost = 16000;
if(user_money < cost){
ColorChat(id, RED, "^x03[Boom` Shop]^x01 You don't have enough money to buy^x04 Awp^x01.");
return PLUGIN_HANDLED;
} else
cs_set_weapon_ammo(give_item(id, "weapon_awp"), 1)
cs_set_user_money_ul(id, user_money - cost)
ColorChat(id, RED, "^x03[Boom` Shop]^x01 You bought^x04 Awp^x01.")
}
case 1: {
if(user_has_weapon(id, CSW_DEAGLE)){
ColorChat(id, RED, "^x03[Boom` Shop]^x01 You already have ^x04 Deagle^x01.");
return PLUGIN_HANDLED;
}
new cost = 14000;
if(user_money < cost){
ColorChat(id, RED, "^x03[Boom` Shop]^x01 You don't have enough money to buy^x04 Deagle^x01.");
return PLUGIN_HANDLED;
}
cs_set_weapon_ammo(give_item(id, "weapon_deagle"), 1)
cs_set_user_money_ul(id, user_money - cost)
ColorChat(id, RED, "^x03[Boom` Shop]^x01 You bought^x04 Deagle^x01.")
}
case 9: show_MainMenu(id);
}
return PLUGIN_HANDLED;
}
can some1 please make in that code ,, only when 15 secs over after round started people could buy those ?
i mean , if round started .. and 15 secs doesnt over yet , no1 could buy AWP / DGL from that code ..
P.S ; IS NOT THE FULL CODE - HERE'S THE THING I WANT SO I DUN HAVE TO POST WHOLE CODE I GUESS .
thanks !