|
楼主 |
发表于 2009-5-7 17:56:19
|
显示全部楼层
来自 中国–甘肃–兰州
case 3:
{
if(!get_cvar_num("amx_pmod"))
{
client_print(id, print_chat, "[Purchase Mod]: Sorry, the plugin is off!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(!is_user_alive(id))
{
client_print(id, print_chat, "[Purchase Mod]: You must be alive to purchase this item!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(get_cvar_num("amx_multiabilities")==0 && powerpur[id] == 0)
{
client_print(id, print_chat, "[Purchase Mod]: You already purchased a different skill!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(powerpurlaser[id] == 0)
{
client_print(id, print_chat, "[Purchase Mod]: You already purchased a laser!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
new money = cs_get_user_money(id);
if(2000 > money)
{
client_print(id, print_chat, "[Purchase Mod]: You have insufficient funds!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
cs_set_user_money(id, (money - 2000), 1);
client_cmd(id,"spk purchasemod/buy");
client_print(id, print_chat, "[Purchase Mod]: You purchased a laser for $2000!");
set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, 10.0, 0.1, 0.1, 10);
show_hudmessage(id, "*");
set_task(5.0,"laser_loop",id);
powerpurlaser[id] = 0;
powerpur[id] = 0;
}
case 4:
{
if(!get_cvar_num("amx_pmod"))
{
client_print(id, print_chat, "[Purchase Mod]: Sorry, the plugin is off!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(!is_user_alive(id))
{
client_print(id, print_chat, "[Purchase Mod]: You must be alive to purchase this item!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(get_cvar_num("amx_multiabilities")==0 && powerpur[id] == 0)
{
client_print(id, print_chat, "[Purchase Mod]: You already purchased a different skill!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(powerpurflashglasses[id] == 0)
{
client_print(id, print_chat, "[Purchase Mod]: You already purchased Anti-Flash Glasses!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
new money = cs_get_user_money(id);
if(5000 > money)
{
client_print(id, print_chat, "[Purchase Mod]: You have insufficient funds!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
cs_set_user_money(id, (money - 5000), 1);
client_cmd(id,"spk purchasemod/buy");
client_print(id, print_chat, "[Purchase Mod]: You purchased Anti-Flash Glasses for $5000!");
set_task(0.0,"event_blinded",id)
powerpurflashglasses[id] = 0;
powerpur[id] = 0;
}
case 5:
{
if(!get_cvar_num("amx_pmod"))
{
client_print(id, print_chat, "[Purchase Mod]: Sorry, the plugin is off!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(!is_user_alive(id))
{
client_print(id, print_chat, "[Purchase Mod]: You must be alive to purchase this item!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(get_cvar_num("amx_multiabilities")==0 && powerpur[id] == 0)
{
client_print(id, print_chat, "[Purchase Mod]: You already purchased a different skill!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(powerpurmultijump[id] == 0)
{
client_print(id, print_chat, "[Purchase Mod]: You already purchased Multi-Jump!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
new money = cs_get_user_money(id);
if(3000 > money)
{
client_print(id, print_chat, "[Purchase Mod]: You have insufficient funds!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
cs_set_user_money(id, (money - 3000), 1);
client_cmd(id,"spk purchasemod/buy");
client_print(id, print_chat, "[Purchase Mod]: You purchased multi-jump for $3000!");
powerpurmultijump[id] = 0;
powerpur[id] = 0;
}
case 6:
{
if(!get_cvar_num("amx_pmod"))
{
client_print(id, print_chat, "[Purchase Mod]: Sorry, the plugin is off!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(!is_user_alive(id))
{
client_print(id, print_chat, "[Purchase Mod]: You must be alive to purchase this item!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(get_cvar_num("amx_multiabilities")==0 && powerpur[id] == 0)
{
client_print(id, print_chat, "[Purchase Mod]: You already purchased a different skill!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(powerpurbunnyhop[id] == 0)
{
client_print(id, print_chat, "[Purchase Mod]: You already purchased bunny-hop!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
new money = cs_get_user_money(id);
if(6000 > money)
{
client_print(id, print_chat, "[Purchase Mod]: You have insufficient funds!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
cs_set_user_money(id, (money - 6000), 1);
client_cmd(id,"spk purchasemod/buy");
client_print(id, print_chat, "[Purchase Mod]: You purchased bunny-hop for $$6000!");
powerpurbunnyhop[id] = 0;
powerpur[id] = 0;
}
case 7:
{
if(!get_cvar_num("amx_pmod"))
{
client_print(id, print_chat, "[Purchase Mod]: Sorry, the plugin is off!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(!is_user_alive(id))
{
client_print(id, print_chat, "[Purchase Mod]: You must be alive to purchase this item!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(get_cvar_num("amx_multiabilities")==0 && powerpur[id] == 0)
{
client_print(id, print_chat, "[Purchase Mod]: You already purchased a different skill!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
if(powerpurhealth[id] == 0)
{
client_print(id, print_chat, "[Purchase Mod]: You already purchased health!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
new money = cs_get_user_money(id);
if(5000 > money)
{
client_print(id, print_chat, "[Purchase Mod]: You have insufficient funds!");
client_cmd(id,"spk purchasemod/sorry");
return PLUGIN_HANDLED;
}
cs_set_user_money(id, (money - 5000), 1);
client_cmd(id,"spk purchasemod/buy");
client_print(id, print_chat, "[Purchase Mod]: You purchased health for $5000!");
set_user_health(id, get_user_health(id) + 50);
powerpurhealth[id] = 0;
powerpur[id] = 0;
}
case 8:
{
set_task(0.0,"showpagetwo",id);
return PLUGIN_CONTINUE;
}
case 9:
{
return PLUGIN_HANDLED;
}
}
return PLUGIN_CONTINUE;
} |
|