Dodano 27 czerwiec 2011 - 20:53:
Możesz mi jeszcze skompilować kasa.sma ?? Bo mi wyskakuje błąd ...
Dodano 27 czerwiec 2011 - 20:57:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <Colorchat> #include <fun> #include <cstrike> #include <engine> #define PLUGIN "Sklep" #define VERSION "1.0" #define AUTHOR "JuMpeR" #define Keysmenu (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5) // Keys: 123456 #define VIPACCESS ADMIN_RESERVATION new jumpnum[33] = 0 new bool:dojump[33] = false new bool:kupilskok[33] = false new cvar_mj, cvar_grav, cvar_awp, cvar_m4a1, cvar_ak47, cvar_zycie; new const prefix[] = "www.planeta-csa.pl"; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_menucmd(register_menuid("menu"), Keysmenu, "Pressedmenu"); register_cvar("sklep_maxjump","1"); register_clcmd ("say /sklep", "Showmenu") cvar_ak47 = register_cvar("sklep_ak47", "5000"); cvar_m4a1 = register_cvar("sklep_m4a1", "5000"); cvar_awp = register_cvar("sklep_awp", "5000"); cvar_grav = register_cvar("sklep_grawitacja", "10000"); cvar_mj = register_cvar("sklep_mj", "5000"); cvar_zycie = register_cvar ("sklep_zycie", "5000"); } public Showmenu(id) { show_menu(id, Keysmenu, "\r Sklep^n1.\y AK47 \r 5000 $^n\r2.\y M4A1 \r 5000 $^n\r3.\y AWP \r 5000 $^n\r4.\y Grawitacja \r 10000 $^n\r5.\y 15HP\r 4000 $^n\r6.\y Podwojny skok \r 8000 $^n", -1, "menu") } public client_putinserver(id) { jumpnum[id] = 0 dojump[id] = false kupilskok[id] = false } public client_disconnect(id) { jumpnum[id] = 0 dojump[id] = false kupilskok[id] = false } public Pressedmenu(id, key) { /* Menu: * Sklep * 1.AK47 * 2.M4A1 * 3.AWP * 4.Grawitacja * 5.Zycie * 6.Podwojny skok */ switch (key) { case 0: { new kasa = cs_get_user_money(id) new cena = get_pcvar_num(cvar_ak47) if(kasa<cena){ ColorChat(id, GREEN, "%d ^x01 nie masz kasy aby kupic ^x03 AK47", prefix); return PLUGIN_HANDLED } else if(!is_user_alive(id)){ ColorChat(id, GREEN, "%s ^x01 Musisz zyc aby kupic AK47.", prefix); } else { cs_set_user_money(id, kasa - cena, 1) give_item(id, "weapon_ak47") cs_set_user_bpammo(id, CSW_AK47, 90) } } case 1: { new kasa = cs_get_user_money(id) new cena = get_pcvar_num(cvar_m4a1) if(kasa<cena){ ColorChat(id, GREEN, "%d ^x01 nie masz kasy aby kupic ^x03 M4A1", prefix); return PLUGIN_HANDLED } else if(!is_user_alive(id)){ ColorChat(id, GREEN, "%s ^x01 Musisz zyc aby kupic ^x03 M4A1.", prefix); } else { cs_set_user_money(id, kasa - cena, 1) give_item(id, "weapon_m4a1") cs_set_user_bpammo(id, CSW_M4A1, 90) ColorChat(id, GREEN, "%s ^x01 Kupiles ^x03 M4A1 !", prefix); } } case 2: { new kasa = cs_get_user_money(id) new cena = get_pcvar_num(cvar_awp) if(kasa<cena){ ColorChat(id, GREEN, "%d ^x01 nie masz kasy aby kupic ^x03 AWP", prefix); return PLUGIN_HANDLED } else if(!is_user_alive(id)){ ColorChat(id, GREEN, "%s ^x01 Musisz zyc aby kupic ^x03 AWP.", prefix); } else { cs_set_user_money(id, kasa - cena, 1) give_item(id, "weapon_awp") cs_set_user_bpammo(id, CSW_AWP, 30) ColorChat(id, GREEN, "%s ^x01 Kupiles ^x03 AWP !", prefix); } } case 3: { new kasa = cs_get_user_money(id) new cena = get_pcvar_num(cvar_grav) if(kasa<cena){ ColorChat(id, GREEN, "%d ^x01 nie masz kasy aby kupic ^x03 Grawitacje", prefix); return PLUGIN_HANDLED } else if(!is_user_alive(id)){ ColorChat(id, GREEN, "%s ^x01 Musisz zyc aby kupic ^x03 Grawitacje.", prefix); } else if(get_user_flags(id) == VIPACCESS) { ColorChat(id, GREEN, "%s ^x01 Jako ^x03 Vip ^x01 nie potrzebujesz tego !", prefix); } else { cs_set_user_money(id, kasa - cena, 1) set_user_gravity(id, 0.95) ColorChat(id, GREEN, "%s ^x01 Kupiles ^x03 Grawitacje !", prefix); } } case 4: { new kasa = cs_get_user_money(id) new cena = get_pcvar_num(cvar_zycie) if(kasa<cena){ ColorChat(id, GREEN, "%d ^x01 nie masz kasy aby kupic ^x03 Zycie", prefix); return PLUGIN_HANDLED } else if(!is_user_alive(id)){ ColorChat(id, GREEN, "%s ^x01 Musisz zyc aby kupic ^x03 Zycie.", prefix); } else { new zycie = get_user_health(id) cs_set_user_money(id, kasa - cena, 1) set_user_health(id, zycie + 15) ColorChat(id, GREEN, "%s ^x01 Kupiles ^x03 Zycie !", prefix); } } case 5: { new kasa = cs_get_user_money(id) new cena = get_pcvar_num(cvar_mj) if(kasa<cena){ ColorChat(id, GREEN, "%d ^x01 nie masz kasy aby kupic ^x03 Podwojny Skok !", prefix); return PLUGIN_HANDLED } else if(!is_user_alive(id)){ ColorChat(id, GREEN, "%s ^x01 Musisz zyc aby kupic ^x03 Podwojny Skok.", prefix); } else if(get_user_flags(id) == VIPACCESS) { ColorChat(id, GREEN, "%s ^x01 Jako ^x03 Vip ^x01 nie potrzebujesz tego !", prefix); } else { cs_set_user_money(id, kasa - cena, 1) kupilskok[id] = true ColorChat(id, GREEN, "%s ^x01 Kupiles ^x03 Podwojny Skok !", prefix); } } } return PLUGIN_HANDLED } public client_PreThink(id) { if(!is_user_alive(id)) return PLUGIN_CONTINUE new nbut = get_user_button(id) new obut = get_user_oldbutton(id) if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP)) { if(jumpnum[id] < get_cvar_num("amx_maxjumps")) { if(kupilskok[id] == true){ dojump[id] = true jumpnum[id]++ return PLUGIN_CONTINUE } } } if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND)) { jumpnum[id] = 0 return PLUGIN_CONTINUE } return PLUGIN_CONTINUE } public client_PostThink(id) { if(!is_user_alive(id)) return PLUGIN_CONTINUE if(get_cvar_num("amx_mjviponly") && (!access(id,VIPACCESS))) return PLUGIN_CONTINUE if(dojump[id] == true) { new Float:velocity[3] entity_get_vector(id,EV_VEC_velocity,velocity) velocity[2] = random_float(265.0,285.0) entity_set_vector(id,EV_VEC_velocity,velocity) dojump[id] = false kupilskok[id] = false return PLUGIN_CONTINUE } return PLUGIN_CONTINUE } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par } */