vip pb
-moze dokupic 100hp za 5000$$ <-- too jest na jedna runde
-mniejsza grawitacja za 8000$$ <-- to tez
-szybsze chodzenei-10000$$ <-- to jest ab zawsze te szybkie chodzenei a chcial bym aby bylo tylko an jedna runde
-buty kota (ciche chodzenie)-15000$$$$ <-- tu tez taki sam błąd jest na zawsze
kazda kupiona opcja jest tylko na jedna runde!!!
#define KlawiszeGracza (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)|(1<<9) new koszt, koszt2, koszt3, koszt4,iSpeed; new bool:SpeedVipActive[33] = false; public plugin_init(){ register_plugin(PLUGIN, VERSION, AUTHOR); register_clcmd("say /vip","OpenShop"); register_clcmd("say /vipshop","OpenShop"); register_clcmd("say /shop","OpenShop"); register_clcmd("say vip","OpenShop"); register_clcmd("say vipshop","OpenShop"); register_clcmd("say shop","OpenShop"); register_menucmd(register_menuid("menu_cmd"), KlawiszeGracza, "ZaznaczKlawiszem"); koszt = register_cvar("vip_koszt_100HP","5000"); koszt2 = register_cvar("vip_koszt_Gravitacji","8000"); koszt3 = register_cvar("vip_koszt_Speeda","10000"); koszt4 = register_cvar("vip_koszt_KocichButow","15000"); iSpeed = register_cvar("vip_fastspeed_active","300"); } public NewRound(){ for(new all=0; all<33; all++){ set_user_gravity(all, 1.0); set_user_footsteps(all, 0); SpeedVipActive[all] = false; } } public OpenShop(id) { if(get_user_flags(id) & ADMIN_LEVEL_C) { if(is_user_alive(id)) { new name[33], TextMenu[1024]; get_user_name(id, name, 32); format(TextMenu, 1023, "\dSiema\y %s^n\rCo chcesz kupic??^n^n1. \w+100HP \r[Koszt: %i $]^n2. \wMniejsza Grawitacja \r[Koszt: %i $]^n3. \wSzybsze Chodzenie \r[Koszt: %i $]^n4. \wButy Kota(\ynie slychac krokow) \r[Koszt: %i $]^n^n0. \yWyjscie", name, get_pcvar_num( koszt ), get_pcvar_num( koszt2 ), get_pcvar_num( koszt3 ), get_pcvar_num( koszt4 )); show_menu(id, KlawiszeGracza, TextMenu, -1, "menu_cmd"); } } else { ColorChat(id, GREEN,"^x03[VIP SHOP]^x04 Sklep jest tylko dla^x03 VIPow!"); } } public ZaznaczKlawiszem(id,key){ switch(key){ case 0:{ if(!Sklep(id, get_pcvar_num(koszt))) return PLUGIN_HANDLED; ColorChat(id, GREEN,"^x03[VIP SHOP]^x04 Zakupiles:^x03 100HP!"); set_user_health(id, get_user_health(id) + 100); } case 1:{ if(!Sklep(id, get_pcvar_num(koszt2))) return PLUGIN_HANDLED; ColorChat(id, GREEN,"^x03[VIP SHOP]^x04 Zakupiles:^x03 Mniejsza Grawitacja!^x01 Tylko na ta Runde!"); set_user_gravity(id, 0.5); } case 2:{ if(!Sklep(id, get_pcvar_num(koszt3))) return PLUGIN_HANDLED; ColorChat(id, GREEN,"^x03[VIP SHOP]^x04 Zakupiles:^x03 Dodatkowe 50% Speeda Wiecej!^x01 Tylko na ta Runde!"); SpeedVipActive[id] = true; } case 3:{ if(!Sklep(id, get_pcvar_num(koszt4))) return PLUGIN_HANDLED; ColorChat(id, GREEN,"^x03[VIP SHOP]^x04 Zakupiles:^x03 Kocie Buty(ciche chodzenie)!^x01 Tylko na ta Runde!"); set_user_footsteps(id, 1); } } return PLUGIN_HANDLED; } public client_PreThink(id){ switch(SpeedVipActive[id]){ case 1: set_user_maxspeed(id, get_pcvar_float(iSpeed)); } } public bool:Sklep(id, amount){ if(cs_get_user_money(id) >= amount){ cs_set_user_money(id,cs_get_user_money(id)-amount); return true; } else{ set_hudmessage(255, 0, 0, -1.0, 0.4, 1, 6.0, 2.0); show_hudmessage(id, "Sorry, Nie masz tyle klasy!"); return false; } return false; }
mogl by ktos naprawic ten kod? proszę
z gory dzięki