hlmod.hu
https://hlmod.hu/

mód kiírás
https://hlmod.hu/viewtopic.php?f=9&t=2957
Oldal: 1 / 1

Szerző:  ChaspeR [2011.12.24. 08:37 ]
Hozzászólás témája:  mód kiírás

ZP-hez az uj módokkal , kellene nekem 1 olyan ami a "Radar" alá teszi PL:
Mód : " Assasin " vagy " Plague mod"
Alá meg mondjuk weboldal hirdetés vagy valami kis szöveg.. meglehet oldani?

Szerző:  kiki [2011.12.24. 09:11 ]
Hozzászólás témája:  Re: mód kiírás

Kód:
#include <amxmodx> 
#include <zombieplague>

#define PLUGIN "[ZP] Addon: Display the Current Mode"
#define VERSION "0.1.4"
#define AUTHOR "meTaLiCroSS"

/*
enum
{
    MODE_INFECTION = 1,
    MODE_NEMESIS,
    MODE_SURVIVOR,
    MODE_SWARM,
    MODE_MULTI,
    MODE_PLAGUE
}
*/

new const g_ModeNames[][] =
{
    "Waiting for New Mode...",
    "Single Mode" ,
    "Nemesis Mode",
    "Survivor Mode",
    "Swarm Mode",
    "Multi-Infection Mode",
    "Plague Mode",
    "Undefined Mode"
}

new const g_Colors[sizeof(g_ModeNames)][3] =
{
    {255, 255, 255},
    {0, 255, 0},
    {255, 0, 0},
    {0, 0, 255},
    {255, 255, 0},
    {0, 255, 0},
    {255, 0, 0},
    {255, 255, 255}
}

// X Hudmessage Position ( ||| )
const Float:HUD_MODE_X = 0.65

// Y Hudmessage Position ( --- )
const Float:HUD_MODE_Y = 0.10

// Variables
new g_SyncHud, g_Mode, g_EnableCvar, g_CentralCvar

public plugin_init() 
{
    // Plugin Info
    register_plugin(PLUGIN, VERSION, AUTHOR)
         
    // Round Start Event
    register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
     
    // Enable Cvar
    g_EnableCvar = register_cvar("zp_display_mode", "1")
     
    // Server Cvar
    register_cvar("zp_addon_dtcm", VERSION, FCVAR_SERVER|FCVAR_SPONLY)
    set_cvar_string("zp_addon_dtcm", VERSION)
     
    // Variables
    g_SyncHud = CreateHudSyncObj()
     
    // Getting "zp_on" cvar
    if(cvar_exists("zp_on"))
        g_CentralCvar = get_cvar_pointer("zp_on")
         
    // If Zombie Plague is not running (bugfix)
    if(!get_pcvar_num(g_CentralCvar))
        pause("a") 
}

public client_putinserver(id)
{
    // Setting Hud
    set_task(1.5, "mode_hud", id, _, _, "b")
}

public event_round_start()
{
    g_Mode = 0
}

public mode_hud(id)
{
    // If the Cvar isn't enabled
    if(!get_pcvar_num(g_EnableCvar))
        return;
         
    // Hud Options
    set_hudmessage(g_Colors[g_Mode][0], g_Colors[g_Mode][1], g_Colors[g_Mode][2], HUD_MODE_X, HUD_MODE_Y, 0, 6.0, 12.0)
     
    // Little Bug Fix ("Current Mode: Waiting for New Mode" ---> "Waiting for New Mode")
    if(g_Mode == 0)
        ShowSyncHudMsg(id, g_SyncHud, "%s", g_ModeNames[g_Mode])
    else
        ShowSyncHudMsg(id, g_SyncHud, "Current Mode: %s", g_ModeNames[g_Mode])
}

public zp_round_started(mode, id)
{
    g_Mode = mode
    if( !(1 <= mode < (sizeof(g_ModeNames) - 1)) )
    {
        g_Mode = sizeof(g_ModeNames) - 1
    }

Szerző:  ChaspeR [2011.12.24. 14:54 ]
Hozzászólás témája:  Re: mód kiírás

Most akkor ez a radar alatt van , és benne vannak az armegoddon meg az assasin meg a sniper is ugye?!

Szerző:  VirTuaL ~` [2012.01.03. 13:47 ]
Hozzászólás témája:  Re: mód kiírás

Az nincs benne :D

________________
Kép
Kép

Oldal: 1 / 1 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/