Skip to content
View in the app

A better way to browse. Learn more.

CsArenaX

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[AMXX] MVP Music + HUD (End Round MVP) by Unguru

Featured Replies

MVP Music System

Plugin AMX Mod X pentru Counter-Strike 1.6
mvp.zip

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

mvp select.jpgmvp.jpg

Instalare

  1. Compilează pluginul mvp_music.sma
  2. Copiază mvp_music.amxx în addons/amxmodx/plugins/
  3. Adaugă în plugins.ini linia: mvp_music.amxx
  4. Creează folderul cstrike/sound/mvp/
  5. Adaugă melodiile: song1.mp3, song2.mp3 etc.
  6. 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

 

 

 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.