Unguru Administrator Posted March 13 Posted March 13 MVP Music System Plugin AMX Mod X pentru Counter-Strike 1.6 This is the hidden content, please Sign In or Sign Up Descriere Acest plugin adaugă un sistem MVP (Most Valuable Player) pentru serverele Counter-Strike 1.6. La sfârșitul fiecărei runde jucătorul cu cele mai multe killuri devine automat MVP. Pe ecran apare un mesaj HUD mare cu numele jucătorului și numărul de killuri, iar ecranul se întunecă pentru câteva secunde pentru a evidenția momentul. În același timp este redată o melodie aleasă de jucător prin meniul /mvp. Funcții Sistem automat MVP la finalul rundei HUD mare cu numele MVP și numărul de killuri Ecran întunecat pentru efect cinematic Melodie MVP redată automat Meniu pentru alegerea melodiei Comandă: /mvp Plugin optimizat și stabil Preview This is the hidden content, please Sign In or Sign Up /monthly_2026_03/mvp.jpg.63c23c8777c489823407917087bb43bd.jpg" src="https://csarenax.ro/forum/applications/core/interface/js/spacer.png"> Instalare Compilează pluginul mvp_music.sma Copiază mvp_music.amxx în addons/amxmodx/plugins/ Adaugă în plugins.ini linia: mvp_music.amxx Creează folderul cstrike/sound/mvp/ Adaugă melodiile: song1.mp3, song2.mp3 etc. Restart server Cod Plugin #include <amxmodx> #define MAX_SONGS 5 new g_PlayerKills[33] new g_PlayerSong[33] new g_MVPName[32] new g_MVPKills new bool:g_ShowMVP new const g_Songs[MAX_SONGS][] = { "mvp/song1.mp3", "mvp/song2.mp3", "mvp/song3.mp3", "mvp/song4.mp3", "mvp/song5.mp3" } new const g_SongNames[MAX_SONGS][] = { "Costel Biju - Te duceam la Han", "Nicolae Guta - Eu sunt capitanul", "Nicolae Guta - De la 11 pana la 10", "Dani Mocanu - Perdoane", "Nicolae Guta - Locul 1 numai 1" } public plugin_init() { register_plugin("MVP Music", "2.3", "Unguru") register_event("DeathMsg","eventDeath","a") register_logevent("eventRoundEnd",2,"1=Round_End") register_logevent("eventRoundStart",2,"1=Round_Start") register_clcmd("say /mvp","cmdMvpMenu") register_clcmd("say_team /mvp","cmdMvpMenu") } public plugin_precache() { for(new i=0;i<MAX_SONGS;i++) { new path[64] format(path,63,"sound/%s",g_Songs[i]) precache_generic(path) } } public client_putinserver(id) { g_PlayerSong[id] = 0 g_PlayerKills[id] = 0 } public eventDeath() { new killer = read_data(1) if(killer && killer <= 32) { g_PlayerKills[killer]++ } } public eventRoundStart() { g_ShowMVP = false remove_task(777) for(new i=1;i<=32;i++) { if(is_user_connected(i)) { removeBlackScreen(i) } } } public eventRoundEnd() { new bestPlayer new bestKills for(new i=1;i<=32;i++) { if(is_user_connected(i) && g_PlayerKills[i] > bestKills) { bestKills = g_PlayerKills[i] bestPlayer = i } } if(bestPlayer) { get_user_name(bestPlayer,g_MVPName,31) g_MVPKills = bestKills showMVP(bestPlayer) } for(new i=1;i<=32;i++) { g_PlayerKills[i] = 0 } } showMVP(id) { // Black screen message_begin(MSG_BROADCAST,get_user_msgid("ScreenFade")) write_short(1<<15) write_short(1<<15) write_short(0x0004) write_byte(0) write_byte(0) write_byte(0) write_byte(255) message_end() g_ShowMVP = true // HUD refresh constant set_task(0.3,"displayMVP",777,_,_,"b") client_print(0,print_chat,"[MVP] %s este MVP cu %d killuri!",g_MVPName,g_MVPKills) new song = g_PlayerSong[id] new command[128] format(command,127,"mp3 play sound/%s",g_Songs[song]) client_cmd(0,command) } public displayMVP() { if(!g_ShowMVP) return set_hudmessage(255,215,0,-1.0,0.35,0,0.0,1.0,0.1,0.2,4) show_hudmessage(0, "★ MVP AL RUNDEI ★^n%s^n%d KILLURI", g_MVPName, g_MVPKills ) } removeBlackScreen(id) { message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},id) write_short(1) write_short(1) write_short(0) write_byte(0) write_byte(0) write_byte(0) write_byte(0) message_end() } public cmdMvpMenu(id) { new menu = menu_create("\yAlege melodia MVP","menuHandler") for(new i=0;i<MAX_SONGS;i++) { menu_additem(menu,g_SongNames[i]) } menu_display(id,menu) return PLUGIN_HANDLED } public menuHandler(id,menu,item) { if(item == MENU_EXIT) { menu_destroy(menu) return PLUGIN_HANDLED } g_PlayerSong[id] = item client_print(id,print_chat,"[MVP] Ai selectat: %s",g_SongNames[item]) menu_destroy(menu) return PLUGIN_HANDLED } Plugin creat de Unguru • Comunitatea CsArenaX
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now