Offline |
|
|
Csatlakozott:2016.03.06. 14:20 Hozzászólások:975 Megköszönt másnak: 112 alkalommal Megköszönték neki: 136 alkalommal
|
Üdvözletem! Mivel rám írtatok 1 páran , és én nem akarom egyenként elküldeni mindenkinek, de ide kirakom egyéb topic-ba akinek kell használja.., modellt mindenki magának állít elő / tölt le, vagy felmegy az én szerveremre. Forrás#define KESZITO "s[T]* Levii" #define STEAMOM "http://steamcommunity.com/id/stuplevii" #include <amxmodx> #include <amxmisc> #include <fun> #include <hamsandwich> #include <cstrike> #include <fakemeta> #define MAX 5 // Átírni ha több USP-t írsz vagy veszel el belőle #define MinimumPont 1 #define MaximumPont 3 #define Prefx = "DeathRun" // Üzenet Prefix new Szint[33],Xp[33],Pont[33],Olesek[33],Elet[33] new knife[33] new const Kesek[][][] = { // Kes Neve | Szint | Eleresi út { "Alap KĂ©s","\rMegszerezve", "models/v_knife.mdl" }, // 0 { "Gyors KĂ©s | \d(+5% SebessĂ©g)", "\r5.Szintol", "models/st_deathrun/kes/v_gyors.mdl" }, // 1 { "Gravitacio KĂ©s |\d(-20% Grav)", "\r10.Szintol", "models/st_deathrun/kes/v_gravi.mdl" }, // 2 { "SzáguldĂł KĂ©s |\d(+15% sebesseg)", "\r15.Szintol", "models/st_deathrun/kes/v_szaguldo_v2.mdl" }, // 3 { "SebzĂ©s KĂ©s |\r\d(+30% SebzĂ©s)", "\r20. Szintol", "models/st_deathrun/kes/v_sebzes.mdl" } // 4 }; new const Level[] = {0, 5, 10, 15 , 20} new const Float:sebesseg[] = {250.0, 260.0 , 250.0 , 280.0 , 250.0} new const Float:gravity[] = {1.0 , 1.0 , 0.84 , 1.0 , 1.0} new kivalasztottUSP[33] new const Usp[][][] = { // Usp Neve | Pont | Eleresi Ăşt { "Sima USP","", "models/v_usp.mdl" }, // 0 { "Spitfire USP | \y(+1.2x DMG)" ,"250 Pont", "models/st_deathrun/usp/v_spitfire.mdl" }, // 1 { "Tűz USP | \y(+1.3x DMG)" ,"350 Pont", "models/st_deathrun/usp/v_tuz.mdl" }, // 2 { "TerepMintás USP | \y(+1.5x DMG)" ,"750 Pont","models/st_deathrun/usp/v_terepmintas.mdl" }, // 3 { "EzĂĽst USP | \y(+1.6x DMG)" ,"1250 Pont", "models/st_deathrun/usp/v_ezust.mdl" } // 4 }; new const Points[] = {0,250,350, 750,1250, 1750, 2000, 2500, 2950, 3500,4550,5000,8000,15000,20000} new const Float:dmg[] = {1.0, 1.2, 1.3, 1.5, 1.6, 1.8, 2.0, 2.1, 2.2, 2.3, 2.4, 2.4, 2.5, 2.5 , 2.6} new pistol[sizeof(Usp)][33] public plugin_init(){ register_plugin(" DeathRun Menu ", " 1.0 ", " s[T]* Levii "); register_clcmd( "chooseteam","Mymenu" ) register_clcmd( "say /menu","Mymenu" ) register_event( "CurWeapon", "SwitchGuns", "be", "1=1" ) RegisterHam( Ham_TakeDamage, "player", "damagetake" ) register_dictionary( "deathrunmenu.txt" ); } public client_death(Killer, Victim) { if(Killer == Victim) { return PLUGIN_HANDLED; } Olesek[Killer]++; new pPont pPont += random_num(MinimumPont, MaximumPont); //A szerkesztéshez a DEFINE-t írd át. Pont[Killer] += pPont; set_hudmessage(255, 255, 255, -1.0, 0.15, 0, 6.0, 2.0); show_hudmessage(Killer, "%L", LANG_PLAYER, "KAPOTTPONT", pPont); if(Szint[Killer] >= 0 && Szint[Killer] < 5){ Xp[Killer] += random_num(20,30) } else if(Szint[Killer] >= 5 && Szint[Killer] < 100){ Xp[Killer] += random_num(1,3) } if(Xp[Killer] >= 100) { Szint[Killer]++ Xp[Killer] -= 100 } return PLUGIN_CONTINUE; } public Mymenu(id) { static String[512]; formatex(String, charsmax(String), "%L", LANG_PLAYER, "FOMENUCIM", Szint[id],Xp[id],Pont[id]); new menu = menu_create(String, "my_handler" ); formatex(String, charsmax(String), "%L", LANG_PLAYER, "FOMENU1"); menu_additem(menu, String, "1"); formatex(String, charsmax(String), "%L", LANG_PLAYER, "FOMENU2"); menu_additem(menu, String, "2"); formatex(String, charsmax(String), "%L", LANG_PLAYER, "FOMENU3"); menu_additem(menu, String, "3"); formatex(String, charsmax(String), "%L", LANG_PLAYER, "FOMENU4"); menu_additem(menu, String, "4"); menu_display(id, menu, 0); } public my_handler(id, menu, item) { if(item == MENU_EXIT) { menu_destroy(menu); return; } new data[9], name[64], Gomb; new access, callback; menu_item_getinfo(menu, item, access, data,charsmax(data), name, charsmax(name), callback); Gomb = str_to_num(data); if(Gomb == 1) MyKnife(id) if(Gomb == 2) MyUsp(id) if(Gomb == 3) MyShop(id) if(Gomb == 4) Myinformation(id) } public MyShop(id) { static String[512]; formatex(String, charsmax(String), "%L", LANG_PLAYER, "FOMENUCIM", Szint[id],Xp[id],Pont[id]); new menu = menu_create(String, "myshop_handler" ); formatex(String, charsmax(String), "%L", LANG_PLAYER, "BOLT0"); menu_additem(menu, String, "0"); formatex(String, charsmax(String), "%L", LANG_PLAYER, "BOLT1"); menu_additem(menu, String, "1"); formatex(String, charsmax(String), "%L", LANG_PLAYER, "BOLT2"); menu_additem(menu, String, "2"); formatex(String, charsmax(String), "%L", LANG_PLAYER, "BOLT3"); menu_additem(menu, String, "3"); menu_display(id, menu, 0); } public myshop_handler(id, menu, item) { if(item == MENU_EXIT) { menu_destroy(menu); return; } new data[9], name[64], Gomb; new access, callback; menu_item_getinfo(menu, item, access, data,charsmax(data), name, charsmax(name), callback); Gomb = str_to_num(data); if(Gomb == 0){ if(Szint[id] < 15 && Pont[id] >= 120) { Szint[id] += 1;Pont[id] -=120 print_color(id, "!g[DeathRun]!y %L",LANG_PLAYER, "SIKERES") } else if(Pont[id] < 120 && Szint[id] < 15) print_color(id, "!g[DeathRun]!y %L",LANG_PLAYER, "KEVESPONT") else if(Szint[id] >= 15) print_color(id, "!g[DeathRun]!y Te nem tudsz továbbá szintet venni, mert elĂ©rted a 15.szintet!") } if(Gomb == 1){ if(Pont[id] >= 24 ) { Pont[id] -= 24;set_user_health(id,get_user_health(id) + 25) print_color(id, "!g[DeathRun]!y %L",LANG_PLAYER, "SIKERES") } else{ print_color(id, "!g[DeathRun]!y %L",LANG_PLAYER, "KEVESPONT") } } if(Gomb ==2){ if(Pont[id] >= 19) { Pont[id] -= 19;set_user_armor(id,get_user_armor(id) + 25) print_color(id, "!g[DeathRun]!y %L",LANG_PLAYER, "SIKERES") } else{ print_color(id, "!g[DeathRun]!y %L",LANG_PLAYER, "KEVESPONT") } } if(Gomb ==3){ if(Pont[id] >= 6 ) { Elet[id] += 1;Pont[ id ] -= 6 print_color(id, "!g[DeathRun]!y %L",LANG_PLAYER, "SIKERES") } else{ print_color(id, "!g[DeathRun]!y %L",LANG_PLAYER, "KEVESPONT") } } } public MyKnife(id) { new txt[128] static String[512]; formatex(String, charsmax(String), "%L", LANG_PLAYER, "FOMENUCIM", Szint[id],Xp[id],Pont[id]); new menu = menu_create(String, "myknife_handler" ); for(new i; i<sizeof(Kesek) ; i++) { formatex(txt, charsmax(txt), "%s%s \d%s", knife[id] == i ? "\y" : "\w", Kesek[i][0], Szint[id] >= Level[i] ? "\r[Szint Elerve]" : Kesek[i][1]) menu_additem(menu, txt, "", 0) } menu_setprop(menu, MPROP_EXIT, MEXIT_ALL); menu_setprop(menu, MPROP_BACKNAME, "Vissza"); menu_setprop(menu, MPROP_NEXTNAME, "Következo"); menu_setprop(menu, MPROP_EXITNAME, "KilĂ©pĂ©s"); menu_display(id, menu, 0) } public myknife_handler(id, menu, item) { if(item == MENU_EXIT) { menu_destroy(menu); return PLUGIN_HANDLED; } if(Szint[id] >= Level[item]){ knife[id] = item print_color(id, "!g[DeathRun]!y %L",LANG_PLAYER, "SIKERES") MyKnife(id) } else{ print_color(id, "!g[DeathRun]!y %L",LANG_PLAYER, "KEVESSZINT") MyKnife(id) } menu_destroy(menu); return PLUGIN_HANDLED; } public MyUsp(id) { new txt[128],txt1[128] static String[512]; formatex(String, charsmax(String), "%L", LANG_PLAYER, "FOMENUCIM", Szint[id],Xp[id],Pont[id]); new menu = menu_create(String, "myusp_handler" ); for(new i; i<sizeof(Usp) ; i++) { formatex(txt1, charsmax(txt1), "\r[Megszerezve]",pistol[i][id]) formatex(txt, charsmax(txt), "%s%s \r%s",kivalasztottUSP[id] == i ? "\r" : "\w",Usp[i][0], pistol[i][id] >= 1 ? txt1 : Usp[i][1],pistol[i][id]) menu_additem(menu, txt, "", 0) } menu_setprop(menu, MPROP_BACKNAME, "Vissza"); menu_setprop(menu, MPROP_NEXTNAME, "Következo"); menu_setprop(menu, MPROP_EXITNAME, "KilĂ©pĂ©s"); menu_display(id, menu, 0) } public myusp_handler(id, menu, item) { if(item == MENU_EXIT) { menu_destroy(menu); return PLUGIN_HANDLED; } if(pistol[item][id] == 0){ if(Pont[id] >= Points[item]) { print_color(id, "!g[DeathRun]!y %L",LANG_PLAYER, "SIKERES") pistol[item][id]++; Pont[id] -= Points[item] MyUsp(id) } else print_color(id, "!g[DeathRun]!y %L",LANG_PLAYER, "KEVESPONT") } else { kivalasztottUSP[id] = item print_color(id, "!g[DeathRun]!y %L",LANG_PLAYER, "SIKERES") MyUsp(id) } menu_destroy(menu); return PLUGIN_HANDLED; } public Myinformation( id ) { new szMenuName[ 512 ] formatex( szMenuName, sizeof( szMenuName ) -1, "\y| \dDeathRun MenĂĽ\y|^n^n^n\y| \rKĂ©szĂtĹ‘je: \ds[T]* Levii\y| ^n \y| \rVerziĂł: \d1.0 \y|") show_menu( id, (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)|(1<<9), szMenuName, -1, "Myinformation_handler" ); } public Myinformation_handler( id, iKey ) { switch( iKey ) { case 0: { Myinformation( id ); } case 1..9: return; } } public damagetake(victim, inflictor, attacker, Float:damage) { if(is_user_alive(attacker) && is_user_alive(victim)) { if(get_user_weapon(attacker) == CSW_KNIFE && knife[attacker] == 4) SetHamParamFloat(4, damage * 1.3) if(get_user_weapon(attacker) == CSW_USP) SetHamParamFloat(4, damage * dmg[kivalasztottUSP[attacker]]) } } public SwitchGuns(id) { switch(get_user_weapon(id)){ case CSW_KNIFE:{ set_pev(id, pev_viewmodel2, Kesek[knife[id]][2]); set_user_maxspeed(id, sebesseg[knife[id]]) set_user_gravity(id, gravity[knife[id]]) } case CSW_USP: { set_pev(id, pev_viewmodel2, Usp[kivalasztottUSP[id]][2]); set_user_maxspeed(id, 250.0) set_user_gravity(id, 1.0) } } } public plugin_precache(){ for(new i = 0; i < sizeof(Kesek); i++) precache_model(Kesek[i][2]) for(new i = 0; i < sizeof(Usp); i++) precache_model(Usp[i][2]) } public Ujraeledes(id) { if(!is_user_alive( id )) if(Elet[id] >= 1 ) { ExecuteHam(Ham_CS_RoundRespawn, id) Elet[id] -=1 print_color(id, "!g[DeathRun]!y %L",LANG_PLAYER, "UJRAELEDTEL") } } public Eletem(id) { print_color(id, "!g[DeathRun]!y %L ",Elet[id],LANG_PLAYER, "ELET") } public client_connect(id) { betoltes(id) Szint[id] = 0 Xp[id] = 0 Pont[id] = 0 Olesek[id] = 0 Elet[id] = 0 knife[id] = 0 kivalasztottUSP[id] = 0 for(new i=0; i <= MAX-1; i++) { pistol[i][id] = 0 } } public client_disconnect(id) { mentes(id) } public mentes(id) { if(is_user_connected(id)) { new file[192], nm[32], mentes[512] get_user_name(id, nm, 31) replace_all(nm, 31, "/", "_") replace_all(nm, 31, "?", "_") replace_all(nm, 31, "!", "_") replace_all(nm, 31, "*", "_") replace_all(nm, 31, "#", "_") replace_all(nm, 31, "=", "_") replace_all(nm, 31, "-", "_") replace_all(nm, 31, "+", "_") replace_all(nm, 31, ",", "_") replace_all(nm, 31, "@", "_") replace_all(nm, 31, "&", "_") replace_all(nm, 31, "{", "_") replace_all(nm, 31, "}", "_") replace_all(nm, 31, "~", "_") replace_all(nm, 31, ":", "_") replace_all(nm, 31, ".", "_") replace_all(nm, 31, "<", "_") replace_all(nm, 31, ">", "_") replace_all(nm, 31, "|", "_") formatex(file, charsmax(file), "addons/amxmodx/configs/deathrun/%s.ini", nm) delete_file(file) format(mentes, charsmax(mentes), "%d %d %d %d %d %d %d %d",Szint[id],Xp[id],Pont[id],Olesek[id],Elet[id],knife[id],kivalasztottUSP[id],pistol[id]) write_file(file, mentes) } } public betoltes(id) { if(is_user_connected(id)) { new file[192], nm[32] get_user_name(id, nm, 31) replace_all(nm, 31, "/", "_") replace_all(nm, 31, "?", "_") replace_all(nm, 31, "!", "_") replace_all(nm, 31, "*", "_") replace_all(nm, 31, "#", "_") replace_all(nm, 31, "=", "_") replace_all(nm, 31, "-", "_") replace_all(nm, 31, "+", "_") replace_all(nm, 31, ",", "_") replace_all(nm, 31, "@", "_") replace_all(nm, 31, "&", "_") replace_all(nm, 31, "{", "_") replace_all(nm, 31, "}", "_") replace_all(nm, 31, "~", "_") replace_all(nm, 31, ":", "_") replace_all(nm, 31, ".", "_") replace_all(nm, 31, "<", "_") replace_all(nm, 31, ">", "_") replace_all(nm, 31, "|", "_") formatex(file, charsmax(file), "addons/amxmodx/configs/deathrun/%s.ini", nm) new file_pointer = fopen(file, "r") if(!file_pointer) { write_file(file, "0 0 0 0 0 0 0 0 0") return PLUGIN_HANDLED } fclose(file_pointer) new lines = file_size(file, 1) new a1[32], a2[32], a3[32], a4[32], a5[32], a6[32], a7[32], a8[32] if(lines > 0) { new buff[512], len read_file(file, lines=0, buff, charsmax(buff), len) parse(buff, a1, 31, a2, 31, a3, 31, a4, 31, a5, 31, a6, 31, a7, 31, a8, 31) Szint[id] = str_to_num(a1) Xp[id] = str_to_num(a2) Pont[id] = str_to_num(a3) Olesek[id] = str_to_num(a4) Elet[id] = str_to_num(a5) knife[id] = str_to_num(a6) kivalasztottUSP[id] = str_to_num(a7) for(new i=0; i <= MAX-1; i++) { pistol[i][id] = str_to_num(a8) } } } return PLUGIN_HANDLED } stock print_color(const id, const input[], any:...) { new count = 1, players[32] static msg[2048] vformat(msg, 2047, input, 3) replace_all(msg, 190, "!g", "^4") replace_all(msg, 190, "!y", "^1") replace_all(msg, 190, "!t", "^3") if (id) players[0] = id; else get_players(players, count, "ch") { for (new i = 0; i < count; i++) { if (is_user_connected(players[i])) { message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]) write_byte(players[i]) write_string(msg) message_end() } } } return PLUGIN_HANDLED }
txt: English fordítása: ( [profil]pixxa112[/profil] ) ► Spoiler mutatása [hu] FOMENUCIM = \wDeathRun Menu \r Szinted:\d %d | \r Tapasztalat: \d %d%% | \rPont: \d %d FOMENU1 = Kes FOMENU2 = USP FOMENU3 = Bolt FOMENU4 = Informaciok BOLT0 = Könyv \r(+1 Szint) \d 120 Pont BOLT1 = Regeneráció \r(+25HP) \d 24 Pont BOLT2 = Fejlettség \r(+25AP) \d19 Pont BOLT3 = Újraéledés \r(+1 élet) \d 6 Pont KAPOTTPONT = +%d Pont KEVESPONT = Sajnálom, de nincs elegendő pontod. SIKERES = Sikeres vásárlás. KEVESSZINT = Sajnálom, de még nincs elegendő szinted. UJRAELEDTEL = Sikeresen újraéledtél. ELET = !t%d!y életed van. [en] FOMENUCIM = \wDeathRun Menu \r Level:\d %d | \r XP: \d %d%% | \rPoint: \d %d FOMENU1 = Knife FOMENU2 = USP FOMENU3 = Shop FOMENU4 = Information BOLT0 = Book \r(+1 level) \d 120 Point BOLT1 = Regeneration \r(+25HP) \d 24 Point BOLT2 = Development \r(+25AP) \d19 Point BOLT3 = Respawn \r(+1 life) \d 6 Point KAPOTTPONT = +%d Points KEVESPONT = Sorry, not enough points. SIKERES = Successful purchases. KEVESSZINT = Sorry, not enough level. UJRAELEDTEL = Successful revived. ELET = !t%d!y Your life is.
És szívesen hallgatok profibbaktól építő jellegű kritikát, sőt annak még örülnék is!:) _________________ ! | Moderátori megjegyzés (kiki): | Kérlek csekkold az aláírásra vonatkozó szabályokat! |
A hozzászólást 8 alkalommal szerkesztették, utoljára The Peace 2017.01.27. 16:27-kor.
Ők köszönték meg The Peace nek ezt a hozzászólást: FonoK (2017.01.27. 12:59) |
|
|