Quote:
Originally Posted by D3XT3R
ok i will maked it compatible with ur zombie mod so could you give me ur zombie mod natives? as get user class hp or something
|
im using umbrella swarm 2.0 of TbagT (and i modify it) , the code does not have natives
Quote:
Originally Posted by Natsheh
So you are using zombie gunxp mod, anywho you are not getting the maxhealth probably or not at a good timing unless AddHealth function is hooked at player spawns
|
PHP Code:
public AddHealth(id)
{
set_user_health(id, get_user_health(id) + (20*HealthLevel[id]));
if(get_user_health(id) > 100.0)
MaxHealth[id] = get_user_health(id);
else
MaxHealth[id] = 100;
Refreshing[id] = false;
}
public AddGravity(id)
{
new Float:Num = (800.0 - GravityLevel[id]*30)/800;
set_user_gravity(id, Num);
}
public event_curweapon(id)
{
if(SpeedLevel[id] > 0)
set_task(0.5, "SetSpeed", id);
}
public SetSpeed(id)
{
set_user_maxspeed(id, get_user_maxspeed(id) +(20*SpeedLevel[id]));
}
public TakeDamage(victim, inflictor, attacker, Float:damage, damagebits)
{
if(victim != attacker)
if(DamageLevel[attacker] > 0)
SetHamParamFloat(4, damage * (1.0 + (DamageLevel[attacker] * 0.2)));
}
public Killed(victim, inflictor, attacker)
{
new Chance = random_num(0, 100);
if(RespawnLevel[victim]*5 >= Chance && !GameOver(get_user_team(victim) == 1 ? "TERRORIST" : "CT"))
{
set_task(2.5, "Revive", victim);
ColorChat(victim, "^4You revived at a chance of %i Percents!", RespawnLevel[victim]*5);
}
}
public Revive(id)
{
ExecuteHamB(Ham_CS_RoundRespawn, id);
}
public NeverEndingRegen()
{
new players[32], num;
get_players(players, num, "ach");
for(new id;id < num;id++)
{
new i = players[id];
if(RegenLevel[i] > 0 && !Refreshing[id])
{
if((get_user_health(i) + RegenLevel[i]) > MaxHealth[i]) set_user_health(i, MaxHealth[i]);
else set_user_health(i, get_user_health(i) + RegenLevel[i]);
}
}
}
here are all of the powers code maybe this will help