Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.

  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

Sklep hns po edycji nie działa.Problem ze sklepem hns po edycji pluginu


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
1 odpowiedź w tym temacie

#1 Krzysztof97

    Pomocny

  • Użytkownik

Reputacja: 1
Nowy

  • Postów:50
  • Imię:Krzysztof
  • Lokalizacja:Blubla
Offline

Napisano 24.08.2012 10:56

Witam!
Mam problem z pluginem.
Chciałem zedytować plugin waqshop:
////////////////////////////////////////////////// //////////////Sklep HNS by Waq 1.1//////////////// ////////////////////////////////////////////////// #include  #include  #include  #include  #include  #include  #define PLUGIN "Sklep HNS" #define VERSION "1.1" #define AUTHOR "Waq" #define Klawisze (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)|(1<<9) new const gszPrefixShop[] = "AMXX.PL"; new const IP[] = "TUTAJ PODAJ SWOJE IP"; new szName[32]; new gmsgScoreInfo; new costFragHE, costFragSB, costFragFB, costFragHP, costFragRespawn, costFragLosRespawn, costFragRandom; new bHE, bSB, bFB, bHP, bRespawn, bLosRespawn, bRandom; new gbHe[33], gbSmoke[33], gbFlash[33], gbHp[33], gbRespawn[33], gbLosRespawn[33], gbLotto[33]; new ileHP; new bool:gbSpeed[33], bool:gbSpeedMin[33], bool:gbCamo[33], bool:gbInvi[33], bool:gbBigJump[33]; new SideJump[33], Float:SideJumpDelay[33] new CTModels[] = {"urban", "gsg9","gign", "sas"} new TModels[] = {"terror", "leet","artic", "guerilla"} public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) new ip[22]; get_user_ip(0, ip, charsmax(ip)); if(!equal(IP, ip)) { set_fail_state("Ten Sklep niemoze byc kopiowany ~ Waq"); } register_clcmd("say kup","Menu"); register_clcmd("say /kup","Menu"); register_clcmd("say_team kup","Menu"); register_clcmd("say_team /kup","Menu"); register_clcmd("say sklep","Menu"); register_clcmd("say /sklep","Menu"); register_clcmd("say_team sklep","Menu"); register_clcmd("say_team /sklep","Menu"); costFragHE= register_cvar("waq_he_cost", "6"); costFragSB= register_cvar("waq_smoke_cost", "6"); costFragFB= register_cvar("waq_flash_cost", "3"); costFragHP= register_cvar("waq_hp_cost", "10"); costFragRespawn= register_cvar("waq_respawn_cost", "12"); costFragLosRespawn= register_cvar("waq_los_respawn_cost", "4"); costFragRandom= register_cvar("waq_lotto_cost", "4"); ileHP= register_cvar("waq_ile_hp", "100"); bHE= register_cvar("waq_he","1"); bSB= register_cvar("waq_smoke","1"); bFB= register_cvar("waq_flash","2"); bHP= register_cvar("waq_hp","1"); bRespawn= register_cvar("waq_respawn","1"); bLosRespawn= register_cvar("waq_los_respawn","3"); bRandom= register_cvar("waq_lotto","3"); gmsgScoreInfo= get_user_msgid("ScoreInfo"); register_menucmd (register_menuid("Menu_klawiszy"), Klawisze, "Uzyj_Menu"); register_event ("HLTV", "eventRoundInit", "a", "1=0", "2=0"); register_event ("HLTV", "eventRoundInit2", "a", "1=0", "2=0"); register_event ("DeathMsg", "Hook_Deathmessage", "a"); register_event ("DeathMsg", "Hook_Deathmessage2", "a"); register_event ("CurWeapon","eventCurWeapon","be","1=1"); } public client_putinserver(id){ for(new i = 1; i<33; i++){ gbHe[i] = 0; gbSmoke[i] = 0; gbFlash[i] = 0; gbHp[i] = 0; gbRespawn[i] = 0; gbLosRespawn[i] = 0; gbLotto[i] = 0; gbSpeed[i] = false; gbSpeedMin[i] = false; gbBigJump[i] = false; } } public eventRoundInit(){ for(new i = 1; i<33; i++){ gbHe[i] = 0; gbSmoke[i] = 0; gbFlash[i] = 0; gbHp[i] = 0; gbRespawn[i] = 0; gbLosRespawn[i] = 0; gbLotto[i] = 0; gbSpeed[i] = false; gbSpeedMin[i] = false; gbBigJump[i] = false; } } public eventRoundInit2(){ new id = read_data( 2 ); fm_set_user_gravity( id, 1.0 ); fm_set_user_maxspeed( id, 250.0 ); if ( gbCamo[id] == true ) { set_task( 1.0, "reset_model", id ) ; } else if ( gbInvi[id] == true ) { set_task( 1.0,"koniec_niewidzialnosci",id); } } public Hook_Deathmessage(){ for(new i = 1; i<33; i++){ gbSpeed[i] = false; gbSpeedMin[i] = false; gbBigJump[i] = false; } } public Hook_Deathmessage2(){ new id = read_data( 2 ) fm_set_user_gravity( id, 1.0 ) fm_set_user_maxspeed( id, 250.0 ) if ( gbCamo[id] == true ) { set_task( 1.0, "reset_model", id ) } else if ( gbInvi[id] == true ) { set_task( 1.0,"koniec_niewidzialnosci",id) } } public eventCurWeapon(id){ if(gbSpeed[id]){ set_pev(id, pev_maxspeed, 280.0); } if(gbSpeedMin[id]){ set_pev(id, pev_maxspeed, 230.0); } } public Menu(id) { if(cs_get_user_team(id) == CS_TEAM_SPECTATOR) return; new MenuText[512] new ma_fragi = get_user_frags(id); format(MenuText,511,"\ySklepik Ganiany \rby Waq^n\yMasz \r[\y%d Fragi/ow\r]^n^n\r1. \wKup HE \r[\y%d Fragow\r]^n\r2. \wKup SMOKE \r[\y%d Fragow\r]^n\r3. \wKup FB \r[\y%d Fragi\r]^n^n\r4. \wKup +%d HP \r[\y%d Fragow\r]^n\r5. \wKup Respawn \r[\y%d Fragow\r]^n^n\r6. \wLosuj Respawn \r[\y%d Fragi\r]^n\r7. \wLosowanie \r[\y%d Fragi\r]^n^n\r0. \wWyjscie", ma_fragi, get_pcvar_num(costFragHE),get_pcvar_num(costFragSB),get_pcvar_num(costFragFB),get_pcvar_num(ileHP),get_pcvar_num(costFragHP),get_pcvar_num(costFragRespawn),get_pcvar_num(costFragLosRespawn),get_pcvar_num(costFragRandom)) show_menu(id, Klawisze, MenuText, -1, "Menu_klawiszy"); } public Uzyj_Menu(id, key) { new ma_fragi = get_user_frags(id); switch(key) { case 0: { if(!is_user_alive(id)) { ColorChat(id, RED, "^x03[%s]^x01Musisz byc zywy !",gszPrefixShop) return PLUGIN_HANDLED } if (get_user_frags(id) < get_pcvar_num(costFragHE)) { ColorChat(id, RED, "^x03[%s]^x01 Masz za malo fragow ! ^x03( %d / %d )",gszPrefixShop, ma_fragi, get_pcvar_num(costFragHE)) return PLUGIN_HANDLED } if(gbHe[id]==get_pcvar_num(bHE)){ ColorChat(id, BLUE, "^x04[%s]^x01 Wykorzystales juz mozliwosc kupienia HE!",gszPrefixShop); return PLUGIN_HANDLED } gbHe[id]++ fm_set_user_frags(id, get_user_frags(id) - get_pcvar_num(costFragHE)) fm_give_item(id, "weapon_hegrenade") ColorChat(id, RED, "^x03[%s]^x01 Zakupiles:^x04 HE",gszPrefixShop) refreshfrags(id) } case 1: { if(!is_user_alive(id)) { ColorChat(id, RED, "^x03[%s]^x01Musisz byc zywy !",gszPrefixShop) return PLUGIN_HANDLED } if (get_user_frags(id) < get_pcvar_num(costFragSB)) { ColorChat(id, RED, "^x03[%s]^x01 Masz za malo ragow ! ^x03( %d / %d )",gszPrefixShop, ma_fragi, get_pcvar_num(costFragSB)) return PLUGIN_HANDLED } if(gbSmoke[id]==get_pcvar_num(bSB)){ ColorChat(id, BLUE, "^x04[%s]^x01 Wykorzystales juz mozliwosc kupienia Smoke!",gszPrefixShop); return PLUGIN_HANDLED } gbSmoke[id]++ fm_set_user_frags(id, get_user_frags(id) - get_pcvar_num(costFragSB)) fm_give_item(id, "weapon_smokegrenade") ColorChat(id, RED, "^x03[%s]^x01 Zakupiles:^x04 Smoke'a",gszPrefixShop) refreshfrags(id) } case 2: { if(!is_user_alive(id)) { ColorChat(id, RED, "^x03[%s]^x01Musisz byc zywy !",gszPrefixShop) return PLUGIN_HANDLED } if (get_user_frags(id) < get_pcvar_num(costFragFB)) { ColorChat(id, RED, "^x03[%s]^x01 Masz za malo ragow ! ^x03( %d / %d )",gszPrefixShop, ma_fragi, get_pcvar_num(costFragFB)) return PLUGIN_HANDLED } if(gbFlash[id]==get_pcvar_num(bFB)){ ColorChat(id, BLUE, "^x04[%s]^x01 Wykorzystales juz mozliwosc kupienia Flasha!",gszPrefixShop); return PLUGIN_HANDLED } gbFlash[id]++ fm_set_user_frags(id, get_user_frags(id) - get_pcvar_num(costFragFB)) fm_give_item(id, "weapon_flashbang") ColorChat(id, RED, "^x03[%s]^x01 Zakupiles:^x04 Granat Oslepiajacy",gszPrefixShop) refreshfrags(id) } case 3: { if(!is_user_alive(id)) { ColorChat(id, RED, "^x03[%s]^x01Musisz byc zywy !",gszPrefixShop) return PLUGIN_HANDLED } if (get_user_frags(id) < get_pcvar_num(costFragHP)) { ColorChat(id, RED, "^x03[%s]^x01 Masz za malo ragow ! ^x03( %d / %d )",gszPrefixShop, ma_fragi, get_pcvar_num(costFragHP)) return PLUGIN_HANDLED } if(gbHp[id]==get_pcvar_num(bHP)){ ColorChat(id, BLUE, "^x04[%s]^x01 Wykorzystales juz mozliwosc kupienia HP!",gszPrefixShop); return PLUGIN_HANDLED } gbHp[id]++ fm_set_user_frags(id, get_user_frags(id) - get_pcvar_num(costFragHP)) fm_set_user_health(id, get_user_health(id) + get_pcvar_num(ileHP)) ColorChat(id, RED, "^x03[%s]^x01 Zakupiles:^x04 Dodatkowe %d HP",gszPrefixShop, get_pcvar_num(ileHP)) refreshfrags(id) } case 4: { if(is_user_alive(id)) { ColorChat(id, RED, "^x03[%s]^x01Musisz byc martwy !",gszPrefixShop) return PLUGIN_HANDLED } if (get_user_frags(id) < get_pcvar_num(costFragRespawn)) { ColorChat(id, RED, "^x03[%s]^x01 Masz za malo ragow ! ^x03( %d / %d )",gszPrefixShop, ma_fragi, get_pcvar_num(costFragRespawn)) return PLUGIN_HANDLED } if(gbRespawn[id]==get_pcvar_num(bRespawn)){ ColorChat(id, BLUE, "^x04[%s]^x01 Wykorzystales juz mozliwosc kupienia Respawna!",gszPrefixShop); return PLUGIN_HANDLED } gbRespawn[id]++ fm_set_user_frags(id, get_user_frags(id) - get_pcvar_num(costFragRespawn)) set_task(0.5, "respawn_player",id); ColorChat(id, RED, "^x03[%s]^x01 Zakupiles:^x04 Respawn",gszPrefixShop) refreshfrags(id) } case 5: { if(is_user_alive(id)) { ColorChat(id, RED, "^x03[%s]^x01Musisz byc martwy !",gszPrefixShop) return PLUGIN_HANDLED } if (get_user_frags(id) < get_pcvar_num(costFragLosRespawn)) { ColorChat(id, RED, "^x03[%s]^x01 Masz za malo ragow ! ^x03( %d / %d )",gszPrefixShop, ma_fragi, get_pcvar_num(costFragLosRespawn)) return PLUGIN_HANDLED } if(gbLosRespawn[id]==get_pcvar_num(bLosRespawn)){ ColorChat(id, BLUE, "^x04[%s]^x01 Wykorzystales juz mozliwosc losowania Respawna!",gszPrefixShop); return PLUGIN_HANDLED } gbLosRespawn[id]++ fm_set_user_frags(id, get_user_frags(id) - get_pcvar_num(costFragLosRespawn)) los_respawn(id) refreshfrags(id) } case 6: { if(!is_user_alive(id)) { ColorChat(id, RED, "^x03[%s]^x01Musisz byc zywy !",gszPrefixShop) return PLUGIN_HANDLED } if (get_user_frags(id) < get_pcvar_num(costFragRandom)) { ColorChat(id, RED, "^x03[%s]^x01 Masz za malo ragow ! ^x03( %d / %d )",gszPrefixShop, ma_fragi, get_pcvar_num(costFragRandom)) return PLUGIN_HANDLED } if(gbLotto[id]==get_pcvar_num(bRandom)){ ColorChat(id, BLUE, "^x04[%s]^x01 Wykorzystales juz mozliwosc kupienia Losowania!",gszPrefixShop); return PLUGIN_HANDLED } gbLotto[id]++ fm_set_user_frags(id, get_user_frags(id) - get_pcvar_num(costFragRandom)) Losowanko(id) } } return PLUGIN_CONTINUE } los_respawn(id){ switch(random_num(1, 100)){ case 1..20:{ ColorChat(id, RED, "^x04[%s]^x01 wylosowales ^x04 Respawn",gszPrefixShop); set_task(0.5, "respawn_player",id); } case 21..100:{ ColorChat(id, RED, "^x04[%s]^x01 wylosowales ^x04 Pusty Los",gszPrefixShop); } } } public Losowanko(id) { get_user_name(id, szName, 31); switch(random_num(1,174)) { case 1..10:{ // PUSTY LOS ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal [Pusty Los]", szName) } case 11..20:{// 2x MNIEJ FRAGOW ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal [Dwa razy mniej fragow]", szName) fm_set_user_frags(id, get_user_frags(id) / 2) } case 21..26:{// 280 MAXSPEED ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal^x04 [Naiki Zapierdalajki]", szName) gbSpeed[id]=true; fm_set_user_maxspeed(id, 280.0) } case 27..36:{// 1 FRAG ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal [1 fraga]", szName) fm_set_user_frags(id, get_user_frags(id) + 1) } case 37..40:{// SMIERC ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal [Smierc]", szName) user_kill(id, 0) } case 41..50:{// +10 FRAGOW ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal^x04 [+10 fragow]", szName) fm_set_user_frags(id, get_user_frags(id) + 10) } case 51..56:{// DUZA GRAWITACJA ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal [Duza grawitacja]", szName) fm_set_user_gravity(id, 3.0); } case 57..66:{// +10 FRAGOW ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal^x04 [+10 fragow]", szName) fm_set_user_frags(id, get_user_frags(id) + 10) } case 67..72:{// 1 FRAG ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal [1 fraga]", szName) fm_set_user_frags(id, get_user_frags(id) + 1) } case 73..75:{// AWP fm_give_item(id, "weapon_awp"); cs_set_user_bpammo(id, CSW_AWP, 0); cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_awp", id), 1); ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal^x04 [AWP]", szName) } case 76..80:{// Smoke ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal^x04 [Smoke]", szName) fm_give_item(id, "weapon_smokegrenade") } case 81..90:{// -50 fragow ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal [-50 fragow]", szName) fm_set_user_frags(id, get_user_frags(id) - 50) } case 91..94:{// 2 razy wiecej fragow ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal^x04 [Dwa razy wiecej fragow]", szName) fm_set_user_frags(id, get_user_frags(id) * 2) } case 95..97:{// mala grawitacja ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal^x04 [Mala grawitacje]", szName) fm_set_user_gravity(id, 0.8); } case 98..110:{// 1hp ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal [1 HP]", szName) fm_set_user_health ( id, 1) } case 111..115:{// pusty los ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal [Pusty Los]", szName) } case 116..118:{// niewidzialnosc ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal^x04 [Niewidzialnosc]", szName) fm_set_user_rendering(id, kRenderFxNone, 0,0,0, kRenderTransAlpha, 10) gbInvi[id] = true } case 119..124:{// 20 hp ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal [20HP]", szName) fm_set_user_health(id, 20) } case 125..127:{// scout fm_give_item(id, "weapon_scout"); cs_set_user_bpammo(id, CSW_SCOUT, 0); cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_scout", id), 1); ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal^x04 [Scouta]", szName) } case 128..132:{// God mode na 20 sec ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal^x04 [GodMode na 20 Sec]", szName) fm_set_user_godmode(id, 1) set_task(20.0,"koniec_godmod",id) } case 133..140:{// 200 max speed ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal [230 MaxSpeed]", szName) fm_set_user_maxspeed(id, 230.0) gbSpeedMin[id]=true } case 141..150:{// 1 FRAG ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal [1 fraga]", szName) fm_set_user_frags(id, get_user_frags(id) + 1) } case 151..153:{// 1 FRAG ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal^x04 [50 fragow]", szName) fm_set_user_frags(id, get_user_frags(id) + 50) } case 154..159:{// HE ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal [Granat HE]", szName) fm_give_item(id, "weapon_hegrenade") } case 160..162:{// 200HP ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal^x04 [200 HP]", szName) fm_set_user_health ( id, 200) } case 163..167:{// Slap ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal [Slap]", szName) m_slap(id) } case 168..170:{// Camouflage ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal^x04 [Camouflage]", szName) new CsTeams:team = cs_get_user_team(id) if (team == CS_TEAM_CT) { cs_set_user_model(id, TModels) gbCamo[id] = true } else if (team == CS_TEAM_T) { cs_set_user_model(id, CTModels) gbCamo[id] = true } } case 171..174:{// Big Jump ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal^x04 [BIG JUMP]", szName) gbBigJump[id] = true } } refreshfrags(id) return PLUGIN_HANDLED } public respawn_player(id){ if (!is_user_connected(id) || is_user_alive(id) || cs_get_user_team(id) == CS_TEAM_SPECTATOR) return; set_pev(id, pev_deadflag, DEAD_RESPAWNABLE) dllfunc(DLLFunc_Think, id) if (is_user_bot(id) && pev(id, pev_deadflag) == DEAD_RESPAWNABLE) { dllfunc(DLLFunc_Spawn, id) } } public refreshfrags(id){ new ideaths=cs_get_user_deaths(id); new ifrags=pev(id, pev_frags); new kteam=_:cs_get_user_team(id); message_begin( MSG_ALL, gmsgScoreInfo, {0,0,0}, 0 ); write_byte( id ); write_short( ifrags ); write_short( ideaths); write_short( 0 ); write_short( kteam ); message_end(); } public reset_model(id) { cs_reset_user_model(id) gbCamo[id] = false } public koniec_niewidzialnosci(id){ fm_set_user_rendering(id, kRenderFxNone, 0,0,0, kRenderTransAlpha, 255) gbInvi[id] = false } public koniec_godmod(id){ fm_set_user_godmode(id, 0) } public m_slap(id){ user_slap(id, 0) user_slap(id, 0) user_slap(id, 0) user_slap(id, 0) user_slap(id, 0) } public client_PreThink(id) { if(is_user_connected(id) && gbBigJump[id]) { new button = entity_get_int(id, EV_INT_button) new jump = (button & IN_JUMP) new flags = entity_get_int(id, EV_INT_flags) new onground = flags & FL_ONGROUND if( jump && onground) SideJump[id] = 1 } } public client_PostThink(id) { if(is_user_connected(id) && gbBigJump[id]) { new Float:gametime = get_gametime() new button = entity_get_int(id, EV_INT_button) new jump = (button & IN_JUMP) new Float:vel[3] new Float:delay=1.0 new Float:pow=1.0 new Float:hight=1000.0 entity_get_vector(id,EV_VEC_velocity,vel) if( (gametime - SideJumpDelay[id] > delay) && SideJump[id] && jump ) { vel[0] *= pow vel[1] *= pow vel[2] = hight entity_set_vector(id,EV_VEC_velocity,vel) SideJump[id] = 0 SideJumpDelay[id] = gametime } else SideJump[id] = 0 } } 


żeby wyszło bez mrożonek i kilku rzeczy z loterii, wyszło mi tak:

////////////////////////////////////////////////// //////////////Sklep HNS by Waq 1.1//////////////// ////////////////////////////////////////////////// #include  #include  #include  #include  #include  #include  #define PLUGIN "Sklep HNS" #define VERSION "1.1" #define AUTHOR "Waq" #define Klawisze (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)|(1<<9) new const gszPrefixShop[] = "AMXX.PL"; new const IP[] = "TUTAJ PODAJ SWOJE IP"; new szName[32]; new gmsgScoreInfo; new costFragHE, costFragSB, costFragFB, costFragHP, costFragRespawn, costFragLosRespawn, costFragRandom; new bHE, bFB, bHP, bRespawn, bLosRespawn, bRandom; new gbHe[33], gbFlash[33], gbHp[33], gbRespawn[33], gbLosRespawn[33], gbLotto[33]; new ileHP; new bool:gbSpeed[33], bool:gbSpeedMin[33], bool:gbCamo[33], bool:gbInvi[33], bool:gbBigJump[33]; new SideJump[33], Float:SideJumpDelay[33] new CTModels[] = {"urban", "gsg9","gign", "sas"} new TModels[] = {"terror", "leet","artic", "guerilla"} public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) new ip[22]; get_user_ip(0, ip, charsmax(ip)); if(!equal(IP, ip)) { set_fail_state("Ten Sklep niemoze byc kopiowany ~ Waq"); } register_clcmd("say kup","Menu"); register_clcmd("say /kup","Menu"); register_clcmd("say_team kup","Menu"); register_clcmd("say_team /kup","Menu"); register_clcmd("say sklep","Menu"); register_clcmd("say /sklep","Menu"); register_clcmd("say_team sklep","Menu"); register_clcmd("say_team /sklep","Menu"); costFragHE= register_cvar("waq_he_cost", "6"); costFragFB= register_cvar("waq_flash_cost", "3"); costFragHP= register_cvar("waq_hp_cost", "10"); costFragRespawn= register_cvar("waq_respawn_cost", "12"); costFragLosRespawn= register_cvar("waq_los_respawn_cost", "4"); costFragRandom= register_cvar("waq_lotto_cost", "4"); ileHP= register_cvar("waq_ile_hp", "100"); bHE= register_cvar("waq_he","1"); bFB= register_cvar("waq_flash","2"); bHP= register_cvar("waq_hp","1"); bRespawn= register_cvar("waq_respawn","1"); bLosRespawn= register_cvar("waq_los_respawn","3"); bRandom= register_cvar("waq_lotto","3"); gmsgScoreInfo= get_user_msgid("ScoreInfo"); register_menucmd (register_menuid("Menu_klawiszy"), Klawisze, "Uzyj_Menu"); register_event ("HLTV", "eventRoundInit", "a", "1=0", "2=0"); register_event ("HLTV", "eventRoundInit2", "a", "1=0", "2=0"); register_event ("DeathMsg", "Hook_Deathmessage", "a"); register_event ("DeathMsg", "Hook_Deathmessage2", "a"); register_event ("CurWeapon","eventCurWeapon","be","1=1"); } public client_putinserver(id){ for(new i = 1; i<33; i++){ gbHe[i] = 0; gbFlash[i] = 0; gbHp[i] = 0; gbRespawn[i] = 0; gbLosRespawn[i] = 0; gbLotto[i] = 0; gbSpeed[i] = false; gbSpeedMin[i] = false; gbBigJump[i] = false; } } public eventRoundInit(){ for(new i = 1; i<33; i++){ gbHe[i] = 0; gbFlash[i] = 0; gbHp[i] = 0; gbRespawn[i] = 0; gbLosRespawn[i] = 0; gbLotto[i] = 0; gbSpeed[i] = false; gbSpeedMin[i] = false; gbBigJump[i] = false; } } public eventRoundInit2(){ new id = read_data( 2 ); fm_set_user_gravity( id, 1.0 ); fm_set_user_maxspeed( id, 250.0 ); if ( gbCamo[id] == true ) { set_task( 1.0, "reset_model", id ) ; } else if ( gbInvi[id] == true ) { set_task( 1.0,"koniec_niewidzialnosci",id); } } public Hook_Deathmessage(){ for(new i = 1; i<33; i++){ gbSpeed[i] = false; gbSpeedMin[i] = false; gbBigJump[i] = false; } } public Hook_Deathmessage2(){ new id = read_data( 2 ) fm_set_user_gravity( id, 1.0 ) fm_set_user_maxspeed( id, 250.0 ) if ( gbCamo[id] == true ) { set_task( 1.0, "reset_model", id ) } else if ( gbInvi[id] == true ) { set_task( 1.0,"koniec_niewidzialnosci",id) } } public eventCurWeapon(id){ if(gbSpeed[id]){ set_pev(id, pev_maxspeed, 280.0); } if(gbSpeedMin[id]){ set_pev(id, pev_maxspeed, 230.0); } } public Menu(id) { if(cs_get_user_team(id) == CS_TEAM_SPECTATOR) return; new MenuText[512] new ma_fragi = get_user_frags(id); format(MenuText,511,"\ySklepik Ganiany \rby Waq^n\yMasz \r[\y%d Fragi/ow\r]^n^n\r1. \wKup HE \r[\y%d Fragow\r]^n\r2.\wKup FB \r[\y%d Fragi\r]^n^n\r3. \wKup +%d HP \r[\y%d Fragow\r]^n\r4. \wKup Respawn \r[\y%d Fragow\r]^n^n\r5. \wLosuj Respawn \r[\y%d Fragi\r]^n\r7. \wLosowanie \r[\y%d Fragi\r]^n^n\r0. \wWyjscie", ma_fragi, get_pcvar_num(costFragHE),get_pcvar_num(costFragSB),get_pcvar_num(costFragFB),get_pcvar_num(ileHP),get_pcvar_num(costFragHP),get_pcvar_num(costFragRespawn),get_pcvar_num(costFragLosRespawn),get_pcvar_num(costFragRandom)) show_menu(id, Klawisze, MenuText, -1, "Menu_klawiszy"); } public Uzyj_Menu(id, key) { new ma_fragi = get_user_frags(id); switch(key) { case 0: { if(!is_user_alive(id)) { ColorChat(id, RED, "^x03[%s]^x01Musisz byc zywy !",gszPrefixShop) return PLUGIN_HANDLED } if (get_user_frags(id) < get_pcvar_num(costFragHE)) { ColorChat(id, RED, "^x03[%s]^x01 Masz za malo fragow ! ^x03( %d / %d )",gszPrefixShop, ma_fragi, get_pcvar_num(costFragHE)) return PLUGIN_HANDLED } if(gbHe[id]==get_pcvar_num(bHE)){ ColorChat(id, BLUE, "^x04[%s]^x01 Wykorzystales juz mozliwosc kupienia HE!",gszPrefixShop); return PLUGIN_HANDLED } gbHe[id]++ fm_set_user_frags(id, get_user_frags(id) - get_pcvar_num(costFragHE)) fm_give_item(id, "weapon_hegrenade") ColorChat(id, RED, "^x03[%s]^x01 Zakupiles:^x04 HE",gszPrefixShop) refreshfrags(id) } case 1: { if(!is_user_alive(id)) { ColorChat(id, RED, "^x03[%s]^x01Musisz byc zywy !",gszPrefixShop) return PLUGIN_HANDLED } if (get_user_frags(id) < get_pcvar_num(costFragFB)) { ColorChat(id, RED, "^x03[%s]^x01 Masz za malo ragow ! ^x03( %d / %d )",gszPrefixShop, ma_fragi, get_pcvar_num(costFragFB)) return PLUGIN_HANDLED } if(gbFlash[id]==get_pcvar_num(bFB)){ ColorChat(id, BLUE, "^x04[%s]^x01 Wykorzystales juz mozliwosc kupienia Flasha!",gszPrefixShop); return PLUGIN_HANDLED } gbFlash[id]++ fm_set_user_frags(id, get_user_frags(id) - get_pcvar_num(costFragFB)) fm_give_item(id, "weapon_flashbang") ColorChat(id, RED, "^x03[%s]^x01 Zakupiles:^x04 Granat Oslepiajacy",gszPrefixShop) refreshfrags(id) } case 2: { if(!is_user_alive(id)) { ColorChat(id, RED, "^x03[%s]^x01Musisz byc zywy !",gszPrefixShop) return PLUGIN_HANDLED } if (get_user_frags(id) < get_pcvar_num(costFragHP)) { ColorChat(id, RED, "^x03[%s]^x01 Masz za malo ragow ! ^x03( %d / %d )",gszPrefixShop, ma_fragi, get_pcvar_num(costFragHP)) return PLUGIN_HANDLED } if(gbHp[id]==get_pcvar_num(bHP)){ ColorChat(id, BLUE, "^x04[%s]^x01 Wykorzystales juz mozliwosc kupienia HP!",gszPrefixShop); return PLUGIN_HANDLED } gbHp[id]++ fm_set_user_frags(id, get_user_frags(id) - get_pcvar_num(costFragHP)) fm_set_user_health(id, get_user_health(id) + get_pcvar_num(ileHP)) ColorChat(id, RED, "^x03[%s]^x01 Zakupiles:^x04 Dodatkowe %d HP",gszPrefixShop, get_pcvar_num(ileHP)) refreshfrags(id) } case 3: { if(is_user_alive(id)) { ColorChat(id, RED, "^x03[%s]^x01Musisz byc martwy !",gszPrefixShop) return PLUGIN_HANDLED } if (get_user_frags(id) < get_pcvar_num(costFragRespawn)) { ColorChat(id, RED, "^x03[%s]^x01 Masz za malo ragow ! ^x03( %d / %d )",gszPrefixShop, ma_fragi, get_pcvar_num(costFragRespawn)) return PLUGIN_HANDLED } if(gbRespawn[id]==get_pcvar_num(bRespawn)){ ColorChat(id, BLUE, "^x04[%s]^x01 Wykorzystales juz mozliwosc kupienia Respawna!",gszPrefixShop); return PLUGIN_HANDLED } gbRespawn[id]++ fm_set_user_frags(id, get_user_frags(id) - get_pcvar_num(costFragRespawn)) set_task(0.5, "respawn_player",id); ColorChat(id, RED, "^x03[%s]^x01 Zakupiles:^x04 Respawn",gszPrefixShop) refreshfrags(id) } case 4: { if(is_user_alive(id)) { ColorChat(id, RED, "^x03[%s]^x01Musisz byc martwy !",gszPrefixShop) return PLUGIN_HANDLED } if (get_user_frags(id) < get_pcvar_num(costFragLosRespawn)) { ColorChat(id, RED, "^x03[%s]^x01 Masz za malo ragow ! ^x03( %d / %d )",gszPrefixShop, ma_fragi, get_pcvar_num(costFragLosRespawn)) return PLUGIN_HANDLED } if(gbLosRespawn[id]==get_pcvar_num(bLosRespawn)){ ColorChat(id, BLUE, "^x04[%s]^x01 Wykorzystales juz mozliwosc losowania Respawna!",gszPrefixShop); return PLUGIN_HANDLED } gbLosRespawn[id]++ fm_set_user_frags(id, get_user_frags(id) - get_pcvar_num(costFragLosRespawn)) los_respawn(id) refreshfrags(id) } case 5: { if(!is_user_alive(id)) { ColorChat(id, RED, "^x03[%s]^x01Musisz byc zywy !",gszPrefixShop) return PLUGIN_HANDLED } if (get_user_frags(id) < get_pcvar_num(costFragRandom)) { ColorChat(id, RED, "^x03[%s]^x01 Masz za malo ragow ! ^x03( %d / %d )",gszPrefixShop, ma_fragi, get_pcvar_num(costFragRandom)) return PLUGIN_HANDLED } if(gbLotto[id]==get_pcvar_num(bRandom)){ ColorChat(id, BLUE, "^x04[%s]^x01 Wykorzystales juz mozliwosc kupienia Losowania!",gszPrefixShop); return PLUGIN_HANDLED } gbLotto[id]++ fm_set_user_frags(id, get_user_frags(id) - get_pcvar_num(costFragRandom)) Losowanko(id) } } return PLUGIN_CONTINUE } los_respawn(id){ switch(random_num(1, 100)){ case 1..20:{ ColorChat(id, RED, "^x04[%s]^x01 wylosowales ^x04 Respawn",gszPrefixShop); set_task(0.5, "respawn_player",id); } case 21..100:{ ColorChat(id, RED, "^x04[%s]^x01 wylosowales ^x04 Pusty Los",gszPrefixShop); } } } public Losowanko(id) { get_user_name(id, szName, 31); switch(random_num(1,174)) { case 1..10:{ // PUSTY LOS ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal [Pusty Los]", szName) } case 11..20:{// 2x MNIEJ FRAGOW ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal [Dwa razy mniej fragow]", szName) fm_set_user_frags(id, get_user_frags(id) / 2) } case 27..36:{// 1 FRAG ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal [1 fraga]", szName) fm_set_user_frags(id, get_user_frags(id) + 1) } case 41..50:{// +10 FRAGOW ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal^x04 [+10 fragow]", szName) fm_set_user_frags(id, get_user_frags(id) + 10) } case 57..66:{// +10 FRAGOW ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal^x04 [+10 fragow]", szName) fm_set_user_frags(id, get_user_frags(id) + 10) } case 67..72:{// 1 FRAG ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal [1 fraga]", szName) fm_set_user_frags(id, get_user_frags(id) + 1) } case 73..75:{// AWP fm_give_item(id, "weapon_awp"); cs_set_user_bpammo(id, CSW_AWP, 0); cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_awp", id), 1); ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal^x04 [AWP]", szName) } case 76..80:{// Smoke ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal^x04 [Smoke]", szName) fm_give_item(id, "weapon_smokegrenade") } case 81..90:{// -50 fragow ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal [-25 fragow]", szName) fm_set_user_frags(id, get_user_frags(id) - 25) } case 91..94:{// 2 razy wiecej fragow ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal^x04 [Dwa razy wiecej fragow]", szName) fm_set_user_frags(id, get_user_frags(id) * 2) } case 95..97:{// mala grawitacja ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal^x04 [Mala grawitacje]", szName) fm_set_user_gravity(id, 0.8); } case 98..110:{// 1hp ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal [1 HP]", szName) fm_set_user_health ( id, 1) } case 111..115:{// pusty los ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal [Pusty Los]", szName) } case 116..118:{// niewidzialnosc ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal^x04 [Niewidzialnosc]", szName) fm_set_user_rendering(id, kRenderFxNone, 0,0,0, kRenderTransAlpha, 10) gbInvi[id] = true } case 119..124:{// 20 hp ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal [20HP]", szName) fm_set_user_health(id, 20) } case 125..127:{// scout fm_give_item(id, "weapon_scout"); cs_set_user_bpammo(id, CSW_SCOUT, 0); cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_scout", id), 1); ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal^x04 [Scouta]", szName) } case 128..132:{// God mode na 20 sec ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal^x04 [GodMode na 20 Sec]", szName) fm_set_user_godmode(id, 1) set_task(20.0,"koniec_godmod",id) } case 141..150:{// 1 FRAG ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal [1 fraga]", szName) fm_set_user_frags(id, get_user_frags(id) + 1) } case 151..153:{// 1 FRAG ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal^x04 [50 fragow]", szName) fm_set_user_frags(id, get_user_frags(id) + 50) } case 154..159:{// HE ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal [Granat HE]", szName) fm_give_item(id, "weapon_hegrenade") } case 160..162:{// 200HP ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal^x04 [200 HP]", szName) fm_set_user_health ( id, 200) } case 163..167:{// Slap ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal [Slap]", szName) m_slap(id) } case 168..170:{// Camouflage ColorChat(0, RED, "^x01Gracz: ^x03%s^x01 wylosowal^x04 [Camouflage]", szName) new CsTeams:team = cs_get_user_team(id) if (team == CS_TEAM_CT) { cs_set_user_model(id, TModels) gbCamo[id] = true } else if (team == CS_TEAM_T) { cs_set_user_model(id, CTModels) gbCamo[id] = true } } } refreshfrags(id) return PLUGIN_HANDLED } public respawn_player(id){ if (!is_user_connected(id) || is_user_alive(id) || cs_get_user_team(id) == CS_TEAM_SPECTATOR) return; set_pev(id, pev_deadflag, DEAD_RESPAWNABLE) dllfunc(DLLFunc_Think, id) if (is_user_bot(id) && pev(id, pev_deadflag) == DEAD_RESPAWNABLE) { dllfunc(DLLFunc_Spawn, id) } } public refreshfrags(id){ new ideaths=cs_get_user_deaths(id); new ifrags=pev(id, pev_frags); new kteam=_:cs_get_user_team(id); message_begin( MSG_ALL, gmsgScoreInfo, {0,0,0}, 0 ); write_byte( id ); write_short( ifrags ); write_short( ideaths); write_short( 0 ); write_short( kteam ); message_end(); } public reset_model(id) { cs_reset_user_model(id) gbCamo[id] = false } public koniec_niewidzialnosci(id){ fm_set_user_rendering(id, kRenderFxNone, 0,0,0, kRenderTransAlpha, 255) gbInvi[id] = false } public koniec_godmod(id){ fm_set_user_godmode(id, 0) } public m_slap(id){ user_slap(id, 0) user_slap(id, 0) user_slap(id, 0) user_slap(id, 0) user_slap(id, 0) } public client_PreThink(id) { if(is_user_connected(id) && gbBigJump[id]) { new button = entity_get_int(id, EV_INT_button) new jump = (button & IN_JUMP) new flags = entity_get_int(id, EV_INT_flags) new onground = flags & FL_ONGROUND if( jump && onground) SideJump[id] = 1 } } public client_PostThink(id) { if(is_user_connected(id) && gbBigJump[id]) { new Float:gametime = get_gametime() new button = entity_get_int(id, EV_INT_button) new jump = (button & IN_JUMP) new Float:vel[3] new Float:delay=1.0 new Float:pow=1.0 new Float:hight=1000.0 entity_get_vector(id,EV_VEC_velocity,vel) if( (gametime - SideJumpDelay[id] > delay) && SideJump[id] && jump ) { vel[0] *= pow vel[1] *= pow vel[2] = hight entity_set_vector(id,EV_VEC_velocity,vel) SideJump[id] = 0 SideJumpDelay[id] = gametime } else SideJump[id] = 0 } } 


Wiecie, jestem zielony i tylko ciut pokasowałem i pozmieniałem:D
Jeśli ktoś mógłby poprawić ten mój/edytować tamten, żeby nie było rzeczy związanych ze speedem, skakaniem i grawitką oraz smoke'ów to byłbym bardzo wdzięczny.
Pozdrawiam
  • +
  • -
  • 0

#2 Krzysztof97

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 1
Nowy

  • Postów:50
  • Imię:Krzysztof
  • Lokalizacja:Blubla
Offline

Napisano 27.08.2012 23:46

Up:D
  • +
  • -
  • 0




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych