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

Subplugin Submission [ZP4.3 + ZP5.0] Addon: Auto Health v1.1 (Calculated by Number of Player and Zombie)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 11-25-2011 , 09:16   [ZP4.3 + ZP5.0] Addon: Auto Health v1.1 (Calculated by Number of Player and Zombie)
Reply With Quote #1

[ZP] Addon: Auto Health
Version 1.1 | Author: Dias

1. Description

- When you get infect, you will get a calculated health by number of player and number of zombie
- I hope this plugin will make your zombie server balanced about health for zombie
--- I saw much server unbalance... 32 player, 2 zombie but zombie health: 2000 -> Quick Death
- Many Zombie = Little Health | Little Zombie = Many Health

2. Calculation
- Health = (Total Player / Total Zombie) * 1000

Example 1: In your server had Total 20 player and 5 zombies
=> Health = (20 / 5) * 1000
<=> Health per zombie = 4000HP

Example 2: In your server had Total 32 player and 10 zombies
=> Health = (32 / 10) * 1000
<=> Health per zombie = 3200HP

Example 3: In your server had Total 32 player and 2 zombies
=> Health = (32 / 2) * 1000
<=> Health per zombie = 16000HP (Just lile first zombie )

Example 4: In your server had Total 25 player and 22 zombies
=> Health = (25 / 22) * 1000
<=> Health per zombie = 1136HP

3. Cvar
- zp_auto_health 1 // Default: 1

4. Credits
- fengxy | His idea
- Dias | Make this plug

5. Fix
- v1.0 | Release
- v1.1 | Fix Nemesis Health, Add Stock Cvar (thank to yokomo)

*If you are finding for ZP5.0 version... Here (I don't sure it will good. This plug converted by JoKeR LauGh, if had error just pm him)

Please comment Before of After download
Attached Files
File Type: sma Get Plugin or Get Source (zp_addon_auto-health_v1.1.sma - 2731 views - 2.2 KB)

Last edited by dias; 11-28-2011 at 17:54.
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
styler
Senior Member
Join Date: Oct 2011
Location: Oslo, Norway
Old 11-25-2011 , 09:26   Re: [ZP] Addon: Auto Health v1.0 (Calculated by Number of Player and Zombie)
Reply With Quote #2

Nice job
styler is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 11-25-2011 , 10:06   Re: [ZP] Addon: Auto Health v1.0 (Calculated by Number of Player and Zombie)
Reply With Quote #3

AFAIK in CSO health is calculated something like this right?
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 11-25-2011 , 10:14   Re: [ZP] Addon: Auto Health v1.0 (Calculated by Number of Player and Zombie)
Reply With Quote #4

yes
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
dfwu.dark
Senior Member
Join Date: Mar 2011
Location: In dreams...
Old 11-25-2011 , 13:06   Re: [ZP] Addon: Auto Health v1.0 (Calculated by Number of Player and Zombie)
Reply With Quote #5

this is awesome ....
__________________
[url]http://hw-movie.blogspot.com[/url]
Watch Latest Movies Online For Free !...
dfwu.dark is offline
Send a message via Skype™ to dfwu.dark
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 11-25-2011 , 18:04   Re: [ZP] Addon: Auto Health v1.0 (Calculated by Number of Player and Zombie)
Reply With Quote #6

sound nice need some code in it . Thanks ;)
__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.
JoKeR LauGh is offline
datka888
Member
Join Date: Oct 2011
Old 11-26-2011 , 10:14   Re: [ZP] Addon: Auto Health v1.0 (Calculated by Number of Player and Zombie)
Reply With Quote #7

i tested it and server crashed :X

Last edited by datka888; 11-26-2011 at 10:44.
datka888 is offline
Send a message via Skype™ to datka888
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 11-26-2011 , 11:04   Re: [ZP] Addon: Auto Health v1.0 (Calculated by Number of Player and Zombie)
Reply With Quote #8

@datka888:
- Crash by yourself. I used this code since 2010 nothing wrong. but why your server crash huh ?
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
datka888
Member
Join Date: Oct 2011
Old 11-26-2011 , 11:08   Re: [ZP] Addon: Auto Health v1.0 (Calculated by Number of Player and Zombie)
Reply With Quote #9

Quote:
Originally Posted by dias View Post
@datka888:
- Crash by yourself. I used this code since 2010 nothing wrong. but why your server crash huh ?
dont know , i tested it and my server crashed,but its ok,i dont need this plugin ;) i have many other ideas for this, thx.

Last edited by datka888; 11-26-2011 at 11:12.
datka888 is offline
Send a message via Skype™ to datka888
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 11-26-2011 , 13:47   Re: [ZP] Addon: Auto Health v1.0 (Calculated by Number of Player and Zombie)
Reply With Quote #10

Some fix, hope you like it.
PHP Code:
#include <amxmodx>
#include <fun>
#include <zombieplague>

#define PLUGIN "[ZP] Addon: Auto Health"
#define VERSION "1.0"
#define AUTHOR "Dias"

new cvar_auto_healthcvar_stock_health
new g_maxplayers

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
g_maxplayers get_maxplayers()
    
    
cvar_auto_health register_cvar("zp_auto_health""1")
    
cvar_stock_health register_cvar("zp_stock_health""1000")
}

public 
zp_user_infected_post(id)
{
    
// Nemesis? no need la
    
if(zp_get_user_nemesis(id)) return;
    
    if(
get_pcvar_num(cvar_auto_health))
    {
        new 
health
        health 
= (get_player_count() / get_zombie_count()) * get_pcvar_num(cvar_stock_health)
        
set_user_health(idhealth)
    }
}

get_zombie_count()
{
    new 
count
    
for(new 0g_maxplayersi++)
    {
        if(
is_user_connected(i) && zp_get_user_zombie(i))
            
count++
    }
    
    return 
count
}

get_player_count()
{
    new 
count
    
for(new 0g_maxplayersi++)
    {
        if(
is_user_connected(i))
            
count++
    }
    
    return 
count

__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
yokomo 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 19:05.


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