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

After death, zombies are reborn with more health than before


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Noah BR
Junior Member
Join Date: Mar 2024
Old 03-14-2024 , 06:48   After death, zombies are reborn with more health than before
Reply With Quote #1

Gentlemen, I'm new here, if I'm in the wrong place I apologize...
I just want help on my zombie plague 5.0.8 server
I would like any class of zombie after death to revive with more life
For example: The zombie's class has 1800 health, after each death he is reborn with another 100 HP, so his next HP would be 1900, then 2000 and so on.

Or the best option would be for the zombie to gain HP in percentage of HP, for example he has 1800, the additional is 10%, so in the next life he would have 1980 and so on.

Thank you in advance for any response.

Last edited by Noah BR; 03-14-2024 at 07:25.
Noah BR is offline
amirwolf
Senior Member
Join Date: Feb 2019
Location: Iran
Old 03-14-2024 , 20:50   Re: After death, zombies are reborn with more health than before
Reply With Quote #2

I have already done this in build mode
I think (not sure) the source code should be edited
__________________

Last edited by amirwolf; 03-14-2024 at 20:52.
amirwolf is offline
Noah BR
Junior Member
Join Date: Mar 2024
Old 03-15-2024 , 08:50   Re: After death, zombies are reborn with more health than before
Reply With Quote #3

Can you help me with this?
Noah BR is offline
Noah BR
Junior Member
Join Date: Mar 2024
Old 03-15-2024 , 14:04   Re: After death, zombies are reborn with more health than before
Reply With Quote #4

Can anyone help me? I'm willing to reward you
Noah BR is offline
amirwolf
Senior Member
Join Date: Feb 2019
Location: Iran
Old 03-15-2024 , 21:06   Re: After death, zombies are reborn with more health than before
Reply With Quote #5

I made a hypothetical thing
PHP Code:
#include <amxmodx>
#include <fun>
#include <hamsandwich>
#include <zombieplague>

#define MAX_PLAYERS 32

new Death_Health[MAX_PLAYERS 1]

public 
plugin_init()
{
    
register_plugin("zp death Health""1.0""َAmir")
    
RegisterHam(Ham_Killed"player""ham_PlayerKilled_Post"1)
    
RegisterHam(Ham_Spawn"player""ham_PlayerSpawn_Post"1)
    
register_event("HLTV""ev_RoundStart""a""1=0""2=0")
}

public 
client_putinserver(idDeath_Health[id] = 0
public client_disconnect(idDeath_Health[id] = 0

public ham_PlayerSpawn_Post(id)
{
    if (
is_user_alive(id) && get_user_team(id) == ZP_TEAM_ZOMBIE)
    {
        
set_user_health(idget_user_health(id) + Death_Health[id])
    }
}

public 
ham_PlayerKilled_PostiVictimiKilleriShouldGib ) {

    if(
is_user_alive(iKiller) && is_user_connected(iVictim)) 
    { 
        
Death_Health[iVictim] += 100
    

}

public 
ev_RoundStart()
{
    new 
iPlayers[32], iPnum
    get_players
(iPlayersiPnum)
    for(new 
iPlayeriiPnumi++)
    {
        
iPlayer iPlayers[i]
        if( !
is_user_alive(iPlayer) || !is_user_connected(iPlayer) || is_user_hltv(iPlayer))
            continue
        
Death_Health[iPlayer] = ;
    }

__________________
amirwolf is offline
Noah BR
Junior Member
Join Date: Mar 2024
Old 03-17-2024 , 11:04   Re: After death, zombies are reborn with more health than before
Reply With Quote #6

That's great, thank you very much
Noah BR is offline
amirwolf
Senior Member
Join Date: Feb 2019
Location: Iran
Old 03-17-2024 , 13:20   Re: After death, zombies are reborn with more health than before
Reply With Quote #7

If you want 10% HP, you can add and replace these items
HTML Code:
#include <zp50_class_zombie>
HTML Code:
Death_Health[iVictim] += (zp_get_zombie_maxhealth(iVictim) * 10) / 100
__________________

Last edited by amirwolf; 03-17-2024 at 13:36.
amirwolf is offline
Noah BR
Junior Member
Join Date: Mar 2024
Old 03-19-2024 , 18:00   Re: After death, zombies are reborn with more health than before
Reply With Quote #8

great work, congratulations and thank you very much!
Noah BR 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 11:28.


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