Raised This Month: $ Target: $400
 0% 

Subplugin Submission [ZP] HUD Stats


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 05-26-2012 , 09:54   [ZP] HUD Stats
Reply With Quote #1

HUD Stats

Description :

This Plugin adds a Director HUD Message at the top of your screen
and counts the Zombie / Players and their wins.

Screenshot :


CVars :

zphud_rcolor ( Default "0") : Sets Red Part of Color
zphud_gcolor ( Default : "255" ) : Sets Green Part of Color
zphud_bcolor ( Default : "0" ) : Sets Blue Part of Color

Required Modules :

AMXMODX
AMXMISC
DHUDMESSAGE
ZOMBIEPLAGUE

Changelog v1.1

~ Added Switch Code for Roundend. ( Thanks to H.RED.ZONE )
~ Made one DHUD Message from two. ( Thanks to jc980 )

I hope you like my first Zombie Plugin,
Greetz KiA.

P.S. You'll have to download the .amxx file or download the .sma file and compile locally.
Attached Files
File Type: sma Get Plugin or Get Source (zp_addon_hud_stats.sma - 2545 views - 1.1 KB)
__________________

Last edited by Kia; 05-28-2012 at 10:44.
Kia is offline
AmineKyo
فوق سريرك
Join Date: Oct 2011
Location: Morocco
Old 05-26-2012 , 10:02   Re: [ZP] HUD Stats
Reply With Quote #2

Good plugin Thanks (:
And remove .amxx please

Last edited by AmineKyo; 05-26-2012 at 10:02.
AmineKyo is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 05-26-2012 , 10:03   Re: [ZP] HUD Stats
Reply With Quote #3

You're welcome.
.amxx deleted.
__________________
Kia is offline
KillerMasa
Senior Member
Join Date: May 2012
Old 05-26-2012 , 10:15   Re: [ZP] HUD Stats
Reply With Quote #4

Nice plugin, good job : )
KillerMasa is offline
gogicaa
Veteran Member
Join Date: Aug 2011
Location: //
Old 05-26-2012 , 12:11   Re: [ZP] HUD Stats
Reply With Quote #5

nice ! ;D
gogicaa is offline
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
jc980
Veteran Member
Join Date: Jan 2010
Location: God is with us...
Old 05-27-2012 , 01:53   Re: [ZP] HUD Stats
Reply With Quote #7

U should use the "^n" on hud messages to save channels. ( even if its 8 channels )

Quote:
"Zombies [%i] | [%i] Humans^nZombie Wins [%i] | [%i] Human Wins"
__________________
jc980 is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 05-27-2012 , 05:47   Re: [ZP] HUD Stats
Reply With Quote #8

Changelog v1.1

~ Added Switch Code for Roundend. ( Thanks to H.RED.ZONE )
~ Made one DHUD Message from two. ( Thanks to jc980 )
Attached Files
File Type: sma Get Plugin or Get Source (zp_addon_hud_stats.sma - 1178 views - 1.1 KB)
__________________
Kia is offline
jc980
Veteran Member
Join Date: Jan 2010
Location: God is with us...
Old 05-27-2012 , 06:43   Re: [ZP] HUD Stats
Reply With Quote #9

You can edit you're first post you know.
__________________
jc980 is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 05-27-2012 , 08:19   Re: [ZP] HUD Stats
Reply With Quote #10

And you could use smaller pic that one is destroying the post.


Then after good changes comes suggestions.
* Add seperated colors for teams.
* Add some hud effect when team wins like "+1" is entering score board
* Add cvar to enable timer it would look nice if you set it on the bottom(timer for round ends in ...)
* Add zp 5.0 version.
* Post link of Dhudmessage so people know where can they download it.

That's all i have.
__________________
H.RED.ZONE 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 16:39.


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