public M4(id) {
if(cs_get_user_team(id) == CS_TEAM_CT)
{
new m4cost = get_cvar_num("m4cost")
new money = cs_get_user_money(id)
if(!is_user_alive(id)) {
client_print(id,print_chat,"活着才能买^n")
}
if(money < m4cost) {
client_print(id,print_chat,"现金不足^n")
}
else {
cs_set_user_money(id,money-m4cost)
give_item(id, "weapon_m4a1")
}
}
}
public AK(id) {
if(cs_get_user_team(id) == CS_TEAM_CT)
{
new akcost = get_cvar_num("akcost")
new moneyy = cs_get_user_money(id)
if(!is_user_alive(id)) {
client_print(id,print_chat,"活着才能买^n")
}
if(moneyy < akcost) {
client_print(id,print_chat,"现金不足^n")
}
else {
cs_set_user_money(id,moneyy-akcost)
give_item(id, "weapon_ak47")
}
}
}
我用if(cs_get_user_team(id) == CS_TEAM_CT)
把整个指令框起来....试试看吧((不行别怪我~
把public M4(id)之后的全部覆盖