#include <amxmodx>
#include <cstrike>
#include <fun>
#define PLUGIN "skelp"
#define VERSION "2.0"
#define AUTHOR "Criss"
new cena
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /sklep", "menu")
}
public menu(id)
{
new menu = menu_create("\wSklepik By Criss:", "wybieranie")
menu_additem(menu, "\wGranat Zamrazajacy" ,"1", 0);
menu_additem(menu, "\wGranat Podpalajacy","2", 0);
menu_additem(menu, "\wKrowa" ,"3", 0);
menu_additem(menu, "\wKAMPA CT", "4", 0);
menu_additem(menu, "\wKAMPA TT", "5", 0);
menu_additem(menu, "\Grawitacja(15sek.)", "6", 0);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, menu)
}
public wybieranie(id, menu, item)
{
if (item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new data[6], iName[64]
new acces, callback
menu_item_getinfo(menu, item, acces, data,5, iName, 63, callback)
new key = str_to_num(data)
new kasa = cs_get_user_money(id)
switch(key)
{
case 1:
{
cena = 1000
if(!is_user_alive(id))
{
client_print(id,print_chat,"[Sklepi] Nie mozesz skorzystac z tej uslugi ziom, bo jestes niezywy ;-(")
return PLUGIN_HANDLED
}
if(kasa >= cena)
{
give_item(id, "weapon_flashbang")
}
}
case 2:
{
cena = 1000
if(!is_user_alive(id))
{
client_print(id,print_chat,"[Sklepik] Nie mozesz skorzystac z tej uslugi ziom, bo jestes niezywy ;-(")
return PLUGIN_HANDLED
}
if(kasa >= cena)
{
give_item(id, "weapon_hegrenade");
}
}
case 3:
{
cena = 5000
if(!is_user_alive(id))
{
client_print(id,print_chat,"[Sklepik] Nie mozesz skorzystac z tej uslugi ziom, bo jestes niezywy ;-(")
}
if(kasa >= cena)
{
give_item(id, "weapon_m249");
give_item(id,"ammo_556nato")
}
}
case 4:
{
cena = 7000
if(!is_user_alive(id))
{
client_print(id,print_chat,"[Sklepik] Nie mozesz skorzystac z tej uslugi ziom, bo jestes niezywy ;-(")
}
if(kasa >= cena)
{
give_item(id, "weapon_sg550");
give_item(id,"ammo_556nato")
}
}
case 5:
{
cena = 7000
if(!is_user_alive(id))
{
client_print(id,print_chat,"[Sklepik] Nie mozesz skorzystac z tej uslugi ziom, bo jestes niezywy ;-(")
}
if(kasa >= cena)
{
give_item(id, "weapon_g3sg1");
give_item(id,"ammo_762nato")
{
case 6:
}
cena = 6000
if(!is_user_alive(id))
{
client_print(id,print_chat,"[Sklepik] Nie mozesz skorzystac z tej uslugi ziom, bo jestes niezywy ;-(")
}
if(kasa >= cena)
{
}
}
menu_destroy(menu)
return PLUGIN_CONTINUE;
}
Użytkownik Criss edytował ten post 20.08.2011 10:35


Dodatki SourceMod



Temat jest zamknięty



sklep.amxx








