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(id) Death_Health[id] = 0
public client_disconnect(id) Death_Health[id] = 0
public ham_PlayerSpawn_Post(id)
{
if (is_user_alive(id) && get_user_team(id) == ZP_TEAM_ZOMBIE)
{
set_user_health(id, get_user_health(id) + Death_Health[id])
}
}
public ham_PlayerKilled_Post( iVictim, iKiller, iShouldGib ) {
if(is_user_alive(iKiller) && is_user_connected(iVictim))
{
Death_Health[iVictim] += 100
}
}
public ev_RoundStart()
{
new iPlayers[32], iPnum
get_players(iPlayers, iPnum)
for(new iPlayer, i; i < iPnum; i++)
{
iPlayer = iPlayers[i]
if( !is_user_alive(iPlayer) || !is_user_connected(iPlayer) || is_user_hltv(iPlayer))
continue
Death_Health[iPlayer] = 0 ;
}
}
__________________