Raised This Month: $ Target: $400
 0% 

Subplugin Submission [ZP] HUD Stats


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 05-26-2012 , 12:15   Re: [ZP] HUD Stats
Reply With Quote #6

One thing, use switch case like this:
And now it's more efficient.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <zombieplague>
#include <dhudmessage>

#define PLUGIN    "Zombie Addon : HUD Stats "
#define VERSION    "1.0"
#define AUTHOR    "KiA"

/* Initialization */

new ZombieWins
new HumanWins

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
set_task(0.5,"HUDUpdate"0,"",0,"b")
    
    
/* CVARS */
    
    
register_cvar("zphud_rcolor","0"// RED
    
register_cvar("zphud_gcolor","255"// GREEN
    
register_cvar("zphud_bcolor","0"// BLUE
    
}

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()
    
    
set_dhudmessage(get_cvar_num("zphud_rcolor"),get_cvar_num("zphud_gcolor"),get_cvar_num("zphud_bcolor"), -1.00.0506.012.0)
    
show_dhudmessage(0"Zombies [%i] | [%i] Humans"zombieshumans)
    
    
set_dhudmessage(get_cvar_num("zphud_rcolor"),get_cvar_num("zphud_gcolor"),get_cvar_num("zphud_bcolor"), -1.00.1006.012.0)
    
show_dhudmessage(0"Zombie Wins [%i] | [%i] Human Wins"ZombieWinsHumanWins)

__________________

Last edited by H.RED.ZONE; 05-26-2012 at 12:19.
H.RED.ZONE is offline
 



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 16:39.


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