Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

RSSDHUD Overlapping


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
Hello, I want to fix dhud overlapping when switching dhud messages.

I'm using Display current mode by Driss and I modify it to hud scoreboard with displaying current mode.

When I'm switching messages, it overlaps.

PHP Code:

#include <amxmodx>
#include <zombieplague>

#if AMXX_VERSION_NUM < 183
    #include <dhudmessage>
#endif 

new const hud_tag[] = ""
 
new mode_names[][] =
{
    
"-[Waiting...]-",        // No mode Started
    
"[Normal Infection]",        // Normal Infection, single round
    
"-[Human VS Nemesis]-",            // Nemesis Mode
    
"[Survivor]",        // Survivor Mode 
    
"[Swarm]",            // Swarm round 
    
"-[Human VS Zombies]-",        // Multiple Infection 
}

const 
Float:START_TIME 3.0
const Float:START_TIME 6.0

/*================================================================================

=================================================================================*/

new const rgb_hud_colors[sizeof(mode_names)][3] =
{
//    R    G    B
    
{255,     255,     255},        // 
    
{0,     255,     0},         // 
    
{255,     0,     0},        // 
    
{255,     70,     0},        // 
    
{0,     0,     255},        // 
    
{0,     255,     255},        //    
}

/* Initialization */

new ZombieWins
new HumanWins
new g_Mode

// Cvar pointers
new cvar_enablecvar_central

public plugin_init() 
{
    
// Plugin Info
    
register_plugin("Addon: Display the Current Mode""0.1.6""driss")
    
    
// Round Start Event
    
register_event("HLTV""event_RoundStart""a""1=0""2=0")
    
    
// Enable Cvar
    
cvar_enable register_cvar("zp_display_mode""5")
    
    
// Set task Hud
    
set_task(START_TIME"HUDUpdate"0,"",0,"b")
    
    
// Server Cvar
    
register_cvar("zp_addon_dtcm""v0.1.6 by meTaLiCroSS"FCVAR_SERVER|FCVAR_SPONLY)
    
    
// Getting "zp_on" cvar
    
if(cvar_exists("zp_on"))
        
cvar_central get_cvar_pointer("zp_on")
    
    
// If Zombie Plague is not running (bugfix)
    
if(!get_pcvar_num(cvar_central))
        
pause("e"
}

public 
event_RoundStart()
{
    
// Update var (no mode started / in delay)
    
g_Mode 0
}

public 
zp_round_started(modeid)
{
    
// Update var with Mode num
    
g_Mode mode
    
    
// An unofficial mode
    
if(!(<= mode < (sizeof(mode_names) - 1)))
        
g_Mode sizeof(mode_names) - 1


public 
zp_round_ended(WinTeam)
{
    switch(
WinTeam
    {
        case 
ZP_TEAM_ZOMBIE: {
            
ZombieWins ZombieWins 1
        
}
        case 
ZP_TEAM_HUMAN: {
            
HumanWins HumanWins 1
        
}
    }
}

public 
HUDUpdate()
{          
    new 
zombies zp_get_zombie_count()
    new 
humans zp_get_human_count()
    
        if(!
get_pcvar_num(cvar_enable))
        return;
    
        
set_dhudmessage(rgb_hud_colors[g_Mode][0], rgb_hud_colors[g_Mode][1], rgb_hud_colors[g_Mode][2], -1.00.006.00.50.10.0)
        
show_dhudmessage(0"%s %s^n-[ Human (%i) / Escapes (%i) ]- -[ Zombies (%i) / Wins (%i) ]-"g_Mode == "" hud_tagmode_names[g_Mode], humansHumanWinszombiesZombieWins)

        if(
zp_is_nemesis_round() & 1) {
    
set_dhudmessage(rgb_hud_colors[g_Mode][0], rgb_hud_colors[g_Mode][1], rgb_hud_colors[g_Mode][2], -1.00.006.00.50.10.0)
    
show_dhudmessage(0"%s %s^n-[ Human (%i) / Escapes (%i) ]- -[ Nemesis (%i) / Wins (%i) ]-", (g_Mode == "" hud_tag), mode_names[g_Mode], humansHumanWinszombiesZombieWins)
    }


VIDEO:
CLICK THIS VIDEO

Przeczytaj cały wpis

Odnośnik do komentarza
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...