AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie Plague Mod (https://forums.alliedmods.net/forumdisplay.php?f=126)
-   -   Subplugin Submission [ZP] HUD Stats (https://forums.alliedmods.net/showthread.php?t=186150)

Kia 05-26-2012 09:54

[ZP] HUD Stats
 
2 Attachment(s)
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 :
http://slike.milf-hosting.info/images/1338120610.jpg
http://www.directupload.net][IMG]htt...6/53sbnmts.jpg
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.

AmineKyo 05-26-2012 10:02

Re: [ZP] HUD Stats
 
Good plugin Thanks (:
And remove .amxx please

Kia 05-26-2012 10:03

Re: [ZP] HUD Stats
 
You're welcome.
.amxx deleted.

KillerMasa 05-26-2012 10:15

Re: [ZP] HUD Stats
 
Nice plugin, good job : )

gogicaa 05-26-2012 12:11

Re: [ZP] HUD Stats
 
nice ! ;D

H.RED.ZONE 05-26-2012 12:15

Re: [ZP] HUD Stats
 
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)



jc980 05-27-2012 01:53

Re: [ZP] HUD Stats
 
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"

Kia 05-27-2012 05:47

Re: [ZP] HUD Stats
 
1 Attachment(s)
Changelog v1.1

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

jc980 05-27-2012 06:43

Re: [ZP] HUD Stats
 
You can edit you're first post you know.

H.RED.ZONE 05-27-2012 08:19

Re: [ZP] HUD Stats
 
And you could use smaller pic that one is destroying the post.
http://slike.milf-hosting.info/images/1338120610.jpg

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.


All times are GMT -4. The time now is 16:39.

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