Helló. Az miért vagy hogy ez nem droppol a mod ?. aranyat, kulcsot, ládát. Aki segít annak megy a gomb !.
#include <amxmodx> #include <amxmisc> #include <colorchat> #include <hamsandwich> #include <engine> #include <fakemeta_util> #include <fakemeta> #include <fun> #define Prefix "Nexon Global Unison 2.0" #define MENU "Nexon" #define MAX 75 new const Csomag[][] = { "models/nexon_global_unison/Drop/csomag.mdl", "models/nexon_global_unison/Drop/arany.mdl", "models/nexon_global_unison/Drop/lada.mdl", "models/nexon_global_unison/Drop/kulcs.mdl" } new const Fegyverek[MAX][] = { { "Terepmintás | AK47" }, { "Régi | AK47" }, { "Sugár | AK47" }, { "Villám | AK47" }, { "Vulcan | AK47" }, { "Nuclear | AK47" }, { "Fire Serpent | AK47" }, { "Fenevad | AK47" }, { "Asiimov | AK47" }, { "Terepmintás | AK47" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" }, { "" } } new const TalalSzoveg[][] = { "[%s] ^3%s ^1Talált egy ^4%s ^1-t", "[%s] ^1Találtál ^4 %d ^1Aranyat", "[%s] ^3%s ^1Talált egy ^4Ládát^1-ot", "[%s] ^3%s ^1Talált egy ^4Kulcs^1-ot" } new OsszesSkin[MAX][33], Lada[33], Kulcs[33], Arany[33], Szint[33], Tapasztalat[33], Pont[33], Ero[33] new NagyFegyo[33], KisFegyo[33] new KepesPont[33] public plugin_init() { register_plugin("Global Unison", "1.0", "Pardon.") register_clcmd("say /menu", "Fomenu") register_impulse(201, "Fomenu") register_clcmd("say /add", "Addolas"); register_event("DeathMsg", "Halal", "a") RegisterHam(Ham_TakeDamage , "player" , "sebzes", 0) register_forward(FM_Touch,"CsomagTouch" ); register_forward(FM_Touch,"AranyTouch" ); register_forward(FM_Touch,"HfLadaTouch" ); register_forward(FM_Touch,"LadaTouch" ); register_forward(FM_Touch,"KulcsTouch" ); } public Addolas(id) { KepesPont[id] += 121; } public Halal() { new Gyilkos = read_data(1) if(Szint[Gyilkos] >= 0 && Szint[Gyilkos] < 1) { Tapasztalat[Gyilkos] += random_num(30,20) } else if(Szint[Gyilkos] >= 5 && Szint[Gyilkos] < 10) { Tapasztalat[Gyilkos] += random_num(15,17) } if(Tapasztalat[Gyilkos] >= 100) { Szint[Gyilkos]++ Pont[Gyilkos]+= 3 Tapasztalat[Gyilkos] -= 100 } //DropEllenorzes(Gyilkos) }/* public DropEllenorzes(id) { new Float:Random = random_float(5.09, 100.00) if(Random < 54.232) { LadaDobas() } else if(Random < 64.232) { KulcsDobas() } else if(Random < 60.232) { CsomagDobas() } else if(Random < 90.505) { AranyDobas() } } public plugin_precache() { new cim[121] for(new i;i < 5; i++) { format(cim, charsmax(cim),"%s", Csomag[i]) precache_model(cim) } } public CsomagDobas() { new victim = read_data( 2 ); static Float:origin[ 3 ]; pev( victim, pev_origin, origin ); new ent = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "info_target" ) ); origin[ 2 ] -= 36; engfunc( EngFunc_SetOrigin, ent, origin ); if( !pev_valid( ent ) ) { return PLUGIN_HANDLED; } set_pev( ent, pev_classname, "Csomag" ); engfunc( EngFunc_SetModel, ent, Csomag[0] ); dllfunc( DLLFunc_Spawn, ent ); set_pev( ent, pev_solid, SOLID_BBOX ); set_pev( ent, pev_movetype, MOVETYPE_NONE ); engfunc( EngFunc_SetSize, ent, Float:{ -23.160000, -13.660000, -0.050000 }, Float:{ 11.470000, 12.780000, 6.720000 } ); engfunc( EngFunc_DropToFloor, ent ); return PLUGIN_HANDLED; } public CsomagTouch(ent, id) { if(pev_valid(ent)) { new classname[ 32 ]; pev( ent, pev_classname, classname, charsmax( classname ) ); if( !equal( classname, "Csomag") ) { return FMRES_IGNORED; } switch(random_num(1, MAX)) { } engfunc( EngFunc_RemoveEntity, ent ); } return FMRES_IGNORED } public logevent_round_start() { new hkt = FM_NULLENT; while ( ( hkt = fm_find_ent_by_class( hkt, "Csomag", "Arany", "Hflada", "Kulcs", "Lada") ) ) { engfunc( EngFunc_RemoveEntity, hkt ); } } public AranyDobas() { new victim = read_data( 2 ); static Float:origin[ 3 ]; pev( victim, pev_origin, origin ); new ent = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "info_target" ) ); origin[ 2 ] -= 36; engfunc( EngFunc_SetOrigin, ent, origin ); if( !pev_valid( ent ) ) { return PLUGIN_HANDLED; } set_pev( ent, pev_classname, "Arany" ); engfunc( EngFunc_SetModel, ent, Csomag[1] ); dllfunc( DLLFunc_Spawn, ent ); set_pev( ent, pev_solid, SOLID_BBOX ); set_pev( ent, pev_movetype, MOVETYPE_NONE ); engfunc( EngFunc_SetSize, ent, Float:{ -23.160000, -13.660000, -0.050000 }, Float:{ 11.470000, 12.780000, 6.720000 } ); engfunc( EngFunc_DropToFloor, ent ); return PLUGIN_HANDLED; } public AranyTouch(ent, id) { if(pev_valid(ent)) { new classname[ 32 ]; pev( ent, pev_classname, classname, charsmax( classname ) ); if( !equal( classname, "Arany") ) { return FMRES_IGNORED; } new pPont; pPont += random_num(1, 11) Arany[id] += pPont; ColorChat(id, GREEN, TalalSzoveg[1], Prefix, pPont) engfunc( EngFunc_RemoveEntity, ent ); } return FMRES_IGNORED } public LadaDobas() { new victim = read_data( 2 ); static Float:origin[ 3 ]; pev( victim, pev_origin, origin ); new ent = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "info_target" ) ); origin[ 2 ] -= 36; engfunc( EngFunc_SetOrigin, ent, origin ); if( !pev_valid( ent ) ) { return PLUGIN_HANDLED; } set_pev( ent, pev_classname, "Lada" ); engfunc( EngFunc_SetModel, ent, Csomag[2] ); dllfunc( DLLFunc_Spawn, ent ); set_pev( ent, pev_solid, SOLID_BBOX ); set_pev( ent, pev_movetype, MOVETYPE_NONE ); engfunc( EngFunc_SetSize, ent, Float:{ -23.160000, -13.660000, -0.050000 }, Float:{ 11.470000, 12.780000, 6.720000 } ); engfunc( EngFunc_DropToFloor, ent ); return PLUGIN_HANDLED; } public LadaTouch(ent, id) { if(pev_valid(ent)) { new classname[ 32 ]; pev( ent, pev_classname, classname, charsmax( classname ) ); if( !equal( classname, "Lada") ) { return FMRES_IGNORED; } new nev[32]; get_user_name(id, nev, 31) Lada[id]++ ColorChat(id, GREEN, TalalSzoveg[2], Prefix, nev) engfunc( EngFunc_RemoveEntity, ent ); } return FMRES_IGNORED } public KulcsDobas() { new victim = read_data( 2 ); static Float:origin[ 3 ]; pev( victim, pev_origin, origin ); new ent = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "info_target" ) ); origin[ 2 ] -= 36; engfunc( EngFunc_SetOrigin, ent, origin ); if( !pev_valid( ent ) ) { return PLUGIN_HANDLED; } set_pev( ent, pev_classname, "Kulcs" ); engfunc( EngFunc_SetModel, ent, Csomag[3] ); dllfunc( DLLFunc_Spawn, ent ); set_pev( ent, pev_solid, SOLID_BBOX ); set_pev( ent, pev_movetype, MOVETYPE_NONE ); engfunc( EngFunc_SetSize, ent, Float:{ -23.160000, -13.660000, -0.050000 }, Float:{ 11.470000, 12.780000, 6.720000 } ); engfunc( EngFunc_DropToFloor, ent ); return PLUGIN_HANDLED; } public KulcsTouch(ent, id) { if(pev_valid(ent)) { new classname[ 32 ]; pev( ent, pev_classname, classname, charsmax( classname ) ); if( !equal( classname, "Kulcs") ) { return FMRES_IGNORED; } new nev[32]; get_user_name(id, nev, 31) Kulcs[id]++ ColorChat(id, GREEN, TalalSzoveg[3], Prefix, nev) engfunc( EngFunc_RemoveEntity, ent ); } return FMRES_IGNORED }*/ public Fomenu(id) { new cim[121] format(cim, charsmax(cim), "\r[%s] \wGlobal Unison^n\yArany: \d%d \w| \ySzint: \d%d \w| \yTapasztalat: \d%d%%", MENU, Arany[id], Szint[id], Tapasztalat[id]) new menu = menu_create(cim, "Fomenu_H") menu_additem(menu, "Gyakorlas", "1",0) menu_additem(menu, "Raktár", "2",0) menu_additem(menu, "Láda Nyitás", "3",0) menu_additem(menu, "Fegyvermenü", "4",0) menu_additem(menu, "Piac", "5",0) menu_additem(menu, "Küldetések", "6",0) menu_display(id, menu, 0) } public Fomenu_H(id, menu, item){ if(item == MENU_EXIT) { menu_destroy(menu) return } new data[9], szName[64] new access, callback menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback) new key = str_to_num(data) switch(key) { case 1: Gyakorlas(id); case 3: LadaMenu(id) } } public Gyakorlas(id) { new cim[121]; format(cim, charsmax(cim), "\r[%s] \wGlobal Unison \r- \dKépességPont: %d", MENU, KepesPont[id]) new menu = menu_create(cim, "Gyak_h"); format(cim, charsmax(cim), "Ero \d(%d/50)", Ero[id]); menu_additem(menu, cim, "1", 0); menu_display(id, menu, 0); } public Gyak_h(id, menu, item){ if(item == MENU_EXIT) { menu_destroy(menu) return } new data[9], szName[64] new access, callback menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback) new key = str_to_num(data) switch(key) { case 1: { if(Ero[id] < 50 && KepesPont[id] >= 1) { Ero[id] ++; KepesPont[id] --; } else if(Ero[id] < 50) { ColorChat(id, GREEN, "%s ^1Elérted a maximális ^3Erőt.", Prefix) } else if(KepesPont[id] < 1) { ColorChat(id, GREEN, "%s ^1Neked nincs egy eloszható ^3Pontod ^1sem.", Prefix) } } } } public LadaMenu(id) { new cim[121] format(cim, charsmax(cim), "\r[%s] \wGlobal Unison \r- \dLáda Nyitás", MENU) new menu = menu_create(cim, "Lada_h") format(cim, charsmax(cim), "\yLáda Nyitás\r*^n\wLáda: \r%d \d| \wKulcs: \r%d", Lada[id], Kulcs[id]) menu_additem(menu, cim, "1",0) menu_display(id, menu, 0) } public Lada_h(id, menu, item){ if(item == MENU_EXIT) { menu_destroy(menu) return } new data[9], szName[64] new access, callback menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback) new key = str_to_num(data) switch(key) { case 1: { if(Lada[id]>= 1 && Kulcs[id]) { Lada[id]-- Kulcs[id]-- //talal(id) } LadaMenu(id) } } } public sebzes(aldozat,inflictor,attacker,Float:damage, DamageBits) { new fegyver = get_user_weapon(attacker) if(is_user_alive(aldozat) && is_user_alive(attacker) && fegyver == CSW_M4A1) { SetHamParamFloat(4, damage + NagyFegyo[attacker] + Ero[attacker]) } if(is_user_alive(aldozat) && is_user_alive(attacker) && fegyver == CSW_AK47) { SetHamParamFloat(4, damage + NagyFegyo[attacker] + Ero[attacker]) } if(is_user_alive(aldozat) && is_user_alive(attacker) && fegyver == CSW_AWP) { SetHamParamFloat(4, damage + NagyFegyo[attacker] + Ero[attacker]) } if(is_user_alive(aldozat) && is_user_alive(attacker) && fegyver == CSW_FAMAS) { SetHamParamFloat(4, damage + NagyFegyo[attacker] + Ero[attacker]) } if(is_user_alive(aldozat) && is_user_alive(attacker) && fegyver == CSW_MP5NAVY) { SetHamParamFloat(4, damage + NagyFegyo[attacker] + Ero[attacker]) } if(is_user_alive(aldozat) && is_user_alive(attacker) && fegyver == CSW_DEAGLE) { SetHamParamFloat(4, damage + KisFegyo[attacker] + Ero[attacker]) } if(is_user_alive(aldozat) && is_user_alive(attacker) && fegyver == CSW_USP) { SetHamParamFloat(4, damage + KisFegyo[attacker] + Ero[attacker]) } return HAM_IGNORED }
|