Raised This Month: $ Target: $400
 0% 

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-28-2011 , 17:52   Re: [ZP 4.3] Addon: Auto Health v1.1 (Calculated by Number of Player and Zombie)
Reply With Quote #1

Update to frist post
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
Gam3ronE
SourceMod Donor
Join Date: Aug 2010
Old 12-03-2011 , 08:27   Re: [ZP4.3 + ZP5.0] Addon: Auto Health v1.1 (Calculated by Number of Player and Zombi
Reply With Quote #2

Good job dias, it is a nice idea and thank you for sharing.
Gam3ronE is offline
tei1995
Senior Member
Join Date: Feb 2011
Location: VietNam
Old 12-04-2011 , 21:05   Re: [ZP4.3 + ZP5.0] Addon: Auto Health v1.1 (Calculated by Number of Player and Zombi
Reply With Quote #3

It wil be useful for our zp sv
__________________

Hatsune Miku~
tei1995 is offline
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 12-05-2011 , 04:43   Re: [ZP4.3 + ZP5.0] Addon: Auto Health v1.1 (Calculated by Number of Player and Zombi
Reply With Quote #4

NOTE:
- You should remove some "dangerous class zombie"
Example:
- Should remove Mirror Zombie. It's can reflect the damage. If the Mirror Zombie is the first zombie, he'll has 10000HP, if someone attack him... He'll reflect the damage and all human die
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
Snaker beatter
Veteran Member
Join Date: Sep 2011
Location: Manila, Philippines
Old 12-09-2011 , 22:43   Re: [ZP4.3 + ZP5.0] Addon: Auto Health v1.1 (Calculated by Number of Player and Zombi
Reply With Quote #5

Nice
__________________
Snaker beatter is offline
New and Clueless
Senior Member
Join Date: Dec 2015
Old 01-23-2016 , 16:09   Re: [ZP4.3 + ZP5.0] Addon: Auto Health v1.1 (Calculated by Number of Player and Zombi
Reply With Quote #6

any chance to make this not go below zombie set health? for example if a zombie class has 3000 hp, and there is 2 human left and 20 zombies and then 1 human get caught, that human who becomes a zombie will only have 1000 hp, so if possible can u make plugin to not go below the zombies classes health, or somehow include their hp in the formula, because if last guy in my server have jp and there is like 5 zombies with 1k hp, thats too easy kills

Code:
/* =========================================
1. Description
- When you get infect, you will get a calculated health by number of players and number of zombies
- I hope this plugin will make your zombie server balanced about health
	--- I saw much server unbalance... 32 player, 2 zombie but zombie health: 2000 -> Quick Death

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 = 4000HP

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

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

3. Cvar
- zp_auto_health 1 // Default: 1

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

#include <amxmodx>
#include <fun>
#include <zombieplague>

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

new cvar_auto_health, cvar_stock_health
new g_maxplayers

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    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(id, health)
    }
}

get_zombie_count()
{
    new count
    for(new i = 0; i < g_maxplayers; i++)
    {
        if(is_user_connected(i) && zp_get_user_zombie(i))
            count++
    }
    
    return count
}

get_player_count()
{
    new count
    for(new i = 0; i < g_maxplayers; i++)
    {
        if(is_user_connected(i))
            count++
    }
    
    return count
}  
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/
__________________

ANY SCRIPTER ON THIS FORUM HAS FREE VIP/ADMIN IN MY SERVER!

Last edited by New and Clueless; 01-23-2016 at 16:27.
New and Clueless 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:20.


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