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)之後的全部覆蓋