Lucas:
You have to check if his team is CS_TEAM_T because it can also be
- CS_TEAM_UNASSIGNED
- CS_TEAM_SPECTATOR
PHP Code:
public showmenu(id)
{
if(is_user_alive(id))
{
new Shop, Item[35];
switch(cs_get_user_team(id))
{
case CS_TEAM_T:
{
Shop = menu_create("\y [\rVampire Shop\y]\y:","vampireshop");
formatex(Item, charsmax(Item), "\wAnti Deagle\y[\r %s $\y]", get_pcvar_num(anti_deagle_cost));
menu_additem(Shop,Item, "1");
formatex(Item, charsmax(Item), "\wRatio Shield!\y[\r %s $\y]", get_pcvar_num(ratio_shield_cost));
menu_additem(Shop,Item, "2");
formatex(Item, charsmax(Item), "\wChamelon\y[\r %s $\y]", get_pcvar_num(spy_cost));
menu_additem(Shop,Item, "3");
}
case CS_TEAM_CT:
{
Shop = menu_create("\y [\rHumen Shop\y]\y:","CsShop");
formatex(Item, charsmax(Item), "\wSilver Light \y[\r %d $\y]", get_pcvar_num(silver_lighet_cost));
menu_additem(Shop,Item, "1");
format(Item,sizeof(Item)-1, "\wShotty\y[\r %d $\y]", get_pcvar_num(Shotghun_cost));
menu_additem(Shop,Item, "2");
format(Item,sizeof(Item)-1, "\wnightvision\y[\r %d $\y]", get_pcvar_num(nightvison_cost));
menu_additem(Shop,Item, "3");
format(Item,sizeof(Item)-1, "\wGreNade Packet\y[\r %d $\y]", get_pcvar_num(grenadepacket_cost));
menu_additem(Shop,Item, "4");
format(Item,sizeof(Item)-1, "\wMachinGun Guy!\y[\r %d $\y]", get_pcvar_num(m249_cost));
menu_additem(Shop,Item, "5");
}
}
menu_setprop(Shop, MPROP_PERPAGE, 0);
menu_display(id, Shop);
}
}
__________________