Raised This Month: $51 Target: $400
 12% 

ZP Score


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tedaimlocks
Member
Join Date: Jan 2024
Old 03-29-2024 , 13:24   ZP Score
Reply With Quote #1

PHP Code:
#include < amxmodx >
#include < dhudmessage >
#include < zombieplague >

#define PLUGIN_NAME "[ZP] DHUD Informer"
#define PLUGIN_VERSION "0.0.0.1"
#define PLUGIN_AUTHOR "Andrei"

enum _eTeamData
{
    
WIN_NO_ONE 0,
    
WIN_ZOMBIES,
    
WIN_HUMANS    

}; new g_iWineTeamData ];

public 
plugin_init() 
{
        
register_plugin
    

        
PLUGIN_NAME
        
PLUGIN_VERSION
        
PLUGIN_AUTHOR
    
);

    
register_dictionary"zp_score.txt" );
    
register_messageget_user_msgid"TextMsg" ), "Message_TextMsg" );
}

public 
Message_TextMsg( ) 
{
    static 
szMessages32 ];
    
get_msg_arg_string2szMessagescharsmaxszMessages ) );
    
    if( 
equalszMessages"#Game_will_restart_in" ) )
    {
        
g_iWinWIN_HUMANS ] = 0;
        
g_iWinWIN_ZOMBIES ] = 0;
        
g_iWinWIN_NO_ONE ] = 0;
    } 
}

public 
zp_round_started( )
{
    
set_task1.0"Ctask__Update",,, .flags "b" );
}  

public 
zp_round_endediWinTeam )
{
    switch( 
iWinTeam )
    {
        case 
WIN_HUMANSg_iWinWIN_HUMANS ]++;
        case 
WIN_ZOMBIESg_iWinWIN_ZOMBIES ]++;
        default: 
g_iWinWIN_NO_ONE ]++;
    }

    
remove_task();
}  


public 
Ctask__Update( )
{
    
set_dhudmessage( .red 0, .green 255, .blue 0, .= -1.0, .0.02, .effects 0, .fxtime 6.0, .holdtime 2.0, .fadeintime 1.0, .fadeouttime 1.0, .reliable false ); 
    
show_dhudmessage0"%L                        "LANG_PLAYER"SCORE_HUMANS"zp_get_human_count() );
    
set_dhudmessage( .red 100, .green 100, .blue 100, .= -1.0, .0.02, .effects 0, .fxtime 6.0, .holdtime 2.0, .fadeintime 1.0, .fadeouttime 1.0, .reliable false ); 
    
show_dhudmessage0"%L^n%L"LANG_PLAYER"SCORE_ROUND", ( g_iWinWIN_HUMANS ] +  g_iWinWIN_ZOMBIES ] + g_iWinWIN_NO_ONE ] ), LANG_PLAYER,  "SCORE_WINS"g_iWinWIN_HUMANS ],  g_iWinWIN_ZOMBIES ] );
    
set_dhudmessage( .red 255, .green 0, .blue 0, .= -1.0, .0.02, .effects 0, .fxtime 6.0, .holdtime 2.0, .fadeintime 1.0, .fadeouttime 1.0, .reliable false ); 
    
show_dhudmessage0"                         %L"LANG_PLAYER"SCORE_ZOMBIES"zp_get_zombie_count() );

May anyone help make this HUD appear before the infection?
PHP Code:
    set_dhudmessage( .red 255, .green 0, .blue 255, .= -1.0, .0.02, .effects 0, .fxtime 6.0, .holdtime 2.0, .fadeintime 1.0, .fadeouttime 1.0, .reliable false ); 
    
show_dhudmessage0"ADD FAVORITE: 178.32.255.68:27015"); 
The plugin is like this:

Round Start - No HUD
Infection Start - Score | HUD Appears

I want it like this:

Round Start - Add server to favorites! : IP ... | Hud Appears
Infection Start - Add sv to fav... | Hud Dissapear and Score Hud Appears

I tried it with zp_round_started_pre and post neither work.

Last edited by tedaimlocks; 03-31-2024 at 15:41.
tedaimlocks is offline
tedaimlocks
Member
Join Date: Jan 2024
Old 03-31-2024 , 15:41   Re: ZP Score
Reply With Quote #2

bump
tedaimlocks is offline
lexzor
Veteran Member
Join Date: Nov 2020
Old 04-01-2024 , 12:59   Re: ZP Score
Reply With Quote #3

hook first infection event and display the hud message there

Last edited by lexzor; 04-01-2024 at 12:59.
lexzor is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:55.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode