RSSy MYGO.pl Opublikowano Styczeń 31, 2021 o 16:25 RSSy Udostępnij Opublikowano Styczeń 31, 2021 o 16:25 I have this this plugin and as you can see, the event should start when I write amx_nemesis_on but its not starting. If I type amx_nemesis_on it appears in my console USAGE: amx_nemesis_on and its not starting. The /event command its working and the models are downloading. Its the first time when this happend to me and I dont know what to do. PHP Code: #include <amxmodx> #include <hamsandwich> #include <cstrike> #include <fun> #include <amxmisc> #include <fakemeta> #include <engine> #include <dhudmessage> #define PLUGIN "BB - Nemesis" #define VERSION "1.5" #define AUTHOR "NuStiu" #pragma tabsize 0 #define IsPlayer(%0) ( 1 <= %0 <= g_iMaxPlayers ) #define ADMIN_ACCESS ADMIN_RCON #define CSW_BALROG3 CSW_MP5NAVY #define KNIFE "models/bb_Nac/xmas_knife.mdl" #define PLAYER_MODEL "Nemesis_Nak" #define SOUND "misc/start_nak.wav" #define NEMESIS "NEMESIS-REZERVA" new iRandomPlayer, Player_T, g_iMaxPlayers, g_pRestart, szName[32], Test = 0, Activ = 0; native fcs_get_user_credits ( id ); native fcs_set_user_credits ( id, credits ); native give_balrog(id); native delete_balrog(id); public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) RegisterHam(Ham_TakeDamage, "player", "HAM_TakeDamage_Post" ) register_logevent("event_round_end", 2, "1=Round_End") register_concmd("amx_nemesis_on","Mod_Activare",ADMIN_ACCESS) register_concmd("amx_nemesis_off","Mod_Dezactivare",ADMIN_ACCESS) g_pRestart = get_cvar_pointer("sv_restart") g_iMaxPlayers = get_maxplayers(); register_clcmd ( "say /event", "Balrog" ); register_clcmd ( "say_team /event", "Balrog"); } public Balrog(id) { if(is_user_alive(id) && Activ == 1 && get_user_team(id) == 2) { new iCredits = fcs_get_user_credits ( id ) - 1000; if ( iCredits < 0 ) { new iCredits2 = 1000 - fcs_get_user_credits (id); ChatColor(id, "!g[BB.LEAGUECS.RO] !teamNu ai destui Euro ! Mai ai nevoie de !g%i!team Euro!",iCredits2 ); return 1; } else { give_balrog(id); cs_set_user_bpammo ( id, CSW_BALROG3, 99999); ChatColor(id, "!g[BB.LEAGUECS.RO]!team Succes! Ai primit !gBalrog!team. Pe langa ai mai primit si !ggloante infinte!team. "); fcs_set_user_credits ( id, iCredits ); return 1; } } else if( Activ == 0 ) { ChatColor(id, "!g[BB.LEAGUECS.RO] Poti cumpara !gBalrog!team doar in timpul eventului!"); return 1; } else if(get_user_team(id) == 1) { ChatColor(id, "!g[BB.LEAGUECS.RO] Nu poti cumpara !gBalrog !teamcand esti !gNemesis!team!"); return 1; } else { ChatColor(id, "!g[BB.LEAGUECS.RO] Nu poti cumpara !teambalrog !gcand esti !gmort!team!"); return 1; } } public plugin_precache() { new string[128] formatex(string, sizeof(string), "models/player/%s/%s.mdl", PLAYER_MODEL,PLAYER_MODEL) precache_model(string) precache_model ( KNIFE ) precache_sound( SOUND ); } public HAM_TakeDamage_Post(iVictim, iInflictor, iAttacker, Float:fDamage, iDamageBits) { if( IsPlayer(iAttacker) && iAttacker == iInflictor && iVictim != iAttacker && Activ == 1 ) { if( get_user_weapon(iAttacker) == CSW_KNIFE && get_user_team(iAttacker) == 1 ) { SetHamParamFloat(4, 500.0) return HAM_HANDLED; } if (get_user_team(iVictim) != 2) { new Money = floatround(fDamage)/10 ; fcs_set_user_credits(iAttacker, fcs_get_user_credits(iAttacker) + Money) } } return HAM_HANDLED; } public event_round_end() { if( Activ == 1) { fcs_set_user_credits(Player_T, fcs_get_user_credits(Player_T) + 10000); ChatColor(Player_T, "!g[BB.LEAGUECS.RO]!team Felicitari! Ai primit !g10000 Euro !teampentru ca ai fost !gNemesis!team!"); new iPlayers4[ 32 ], iNum4; get_players(iPlayers4, iNum4) for(new i = 0 ; i < iNum4 ; i++) { delete_balrog(iPlayers4[i]); if( !is_user_alive(Player_T) ) { set_hudmessage( 255, 0, 0, -1.0, 0.5, 1, 20.0 ); show_hudmessage(0, "Nemesis-ul a mancat gloante pana a fost omorat!^nPentru damage-ul facut ati primit ca bonus Euro! ") } else { set_hudmessage( 255, 0, 0, -1.0, 0.5, 1, 20.0 ); show_hudmessage(0, "Nemesis-ul a ucis pe toata lumea!^nPoate o sa aveti mai mult noroc data viitoare! ") } set_task(5.0, "Mod_Dezactivare"); } } } public Mod_Activare(id,level,cid) { if(!cmd_access(id,level,cid,2)) return PLUGIN_HANDLED; new szFirstArg[ 32 ] read_argv( 1, szFirstArg, sizeof ( szFirstArg ) -1 ); if( equal( szFirstArg, "" ) ) { client_cmd( id, "echo amx_wtfx_on < nume >" ); return 1; } iRandomPlayer = cmd_target( id, szFirstArg, 8 ); if( !iRandomPlayer ) { client_cmd( id, "echo Jucatorul %s nu a fost gasit!", szFirstArg ); return 1; } pause ( "ac", "bb_Nak_base_inco.amxx" ) pause ( "ac", "bb_respawnzm.amxx" ) pause ( "ac", "bb_grab.amxx" ) pause ( "ac", "help_system.amxx" ) pause ( "ac", "bb_admin_menu.amxx" ) pause ( "ac", "godmode_noclip.amxx" ) client_cmd( 0, "spk %s", SOUND ); Activ = 1; new iPlayersx3[ 32 ], iNumx3; get_players(iPlayersx3, iNumx3) for(new i = 0 ; i < iNumx3 ; i++) { if( is_user_alive( id ) ) { cs_set_user_team ( iPlayersx3[i], CS_TEAM_CT ); ExecuteHamB ( Ham_CS_RoundRespawn, iPlayersx3[i] ); give_item ( iPlayersx3[i],"weapon_flashbang" ) give_item ( iPlayersx3[i],"weapon_hegrenade" ) give_item ( iPlayersx3[i],"weapon_smokegrenade" ) give_item( iPlayersx3[i], "weapon_ak47" ); cs_set_user_bpammo ( iPlayersx3[i], CSW_AK47, 999); give_item( iPlayersx3[i], "weapon_m4a1" ); cs_set_user_bpammo ( iPlayersx3[i], CSW_M4A1, 999); } } server_cmd("amx_lights a"); server_cmd("bh_flare_enable 1"); Mod_Activat(); return PLUGIN_HANDLED; } public Mod_Activat() { new iPlayers[ 32 ], iNum; get_players(iPlayers, iNum) get_user_name(iRandomPlayer, szName, charsmax(szName)); cs_reset_user_model( iRandomPlayer ); cs_set_user_model(iRandomPlayer, PLAYER_MODEL); cs_set_user_team ( iRandomPlayer, CS_TEAM_T ); ExecuteHamB ( Ham_CS_RoundRespawn, iRandomPlayer ); new health = get_user_health( iRandomPlayer ); set_user_health(iRandomPlayer, health + 100000); set_user_gravity(iRandomPlayer, 0.2); strip_user_weapons ( iRandomPlayer ); give_item( iRandomPlayer, "weapon_knife" ); set_pev( iRandomPlayer, pev_viewmodel2, KNIFE ); Player_T = iRandomPlayer; if( Test == 0 ) { new FAKE_PLAYER = engfunc(EngFunc_CreateFakeClient,NEMESIS) dllfunc(DLLFunc_ClientConnect,FAKE_PLAYER) dllfunc(DLLFunc_ClientPutInServer,FAKE_PLAYER) set_pev(FAKE_PLAYER,pev_team,3) cs_set_user_team ( FAKE_PLAYER, CS_TEAM_T ); ExecuteHamB ( Ham_CS_RoundRespawn, FAKE_PLAYER ); Test=1; } set_hudmessage( 255, 0, 0, -1.0, 0.1, 2, 20.0 ); show_hudmessage(0, "%s a devenit NEMESIS!^nPaziti-va spatele si faceti cat mai mult damage! ",szName) set_hudmessage( 0, 255, 0, -1.0, 0.5, 1, 12.0 ); show_hudmessage(iRandomPlayer, " Ai devenit NEMESIS! ^nFereste-te de gloante si omoara cat mai multi Jucatori!"); set_task(0.1, "Mesaj_Hud", _, _, _,"b"); set_task(5.0, "Glow"); return PLUGIN_HANDLED; } public Mod_Dezactivare(id,level,cid) { if(!cmd_access(id,level,cid,2)) return PLUGIN_HANDLED; unpause ( "ac", "bb_Nak_base_inco.amxx" ) unpause ( "ac", "bb_respawnzm.amxx" ) unpause ( "ac", "bb_grab.amxx" ) unpause ( "ac", "help_system.amxx" ) unpause ( "ac", "bb_admin_menu.amxx" ) unpause ( "ac", "godmode_noclip.amxx" ) server_cmd("kick ^"%s^"", NEMESIS); new iPlayersx2[ 32 ], iNumx2; get_players(iPlayersx2, iNumx2) for(new i = 0 ; i < iNumx2 ; i++) { set_rendering ( iPlayersx2[i], kRenderFxNone, 0, 0, 0, kRenderNormal, 255 ); } server_cmd("amx_lights off"); server_cmd("bh_flare_enable 0"); Activ = 0; Test = 0; set_pcvar_num(g_pRestart, 1) return PLUGIN_HANDLED; } public Mesaj_Hud(id) { new healthh = get_user_health(Player_T); new iPlayersx[ 32 ], iNumx; get_players(iPlayersx, iNumx) for(new i = 0 ; i < iNumx ; i++) { new iCreditsx = fcs_get_user_credits(iPlayersx[i]); if( Activ == 1) { Verifica_Nemesis(); set_dhudmessage(random_num(0, 50), random_num(0, 50), random_num(0, 50), 0.02, 0.16, 0, 20.0 ); show_dhudmessage(iPlayersx[i], "HP NEMESIS: %d^nEURO: %i^nScrie /event in chat pentru a cumpara Balrog!",healthh , iCreditsx ); } } return PLUGIN_HANDLED } public Verifica_Nemesis() { if(!is_user_connected(Player_T) ) Mod_Activat(); return PLUGIN_HANDLED } public Glow() { set_user_maxspeed( Player_T, 800.0 ); set_rendering ( Player_T, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 20 ); } //********************STOCK-URI******************** stock ChatColor(const id, const input[], any:...) { new count = 1, players[32] static msg[191] vformat(msg, 190, input, 3) replace_all(msg, 190, "!g", "^4") replace_all(msg, 190, "!y", "^1") replace_all(msg, 190, "!team", "^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(); } } } } Przeczytaj cały wpis Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi