Raised This Month: $ Target: $400
 0% 

After death, zombies are reborn with more health than before


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 


Thread Tools
Display Modes

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 00:39.


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