View Single Post
Mr.J
Senior Member
Join Date: Sep 2017
Location: cs_assault
Old 01-03-2018 , 13:28   Re: Need help for powers code
Reply With Quote #19

Quote:
Originally Posted by D3XT3R View Post
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 View Post
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(idget_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(idNum);
}

public 
event_curweapon(id)
{
    if(
SpeedLevel[id] > 0)
        
set_task(0.5"SetSpeed"id);
}

public 
SetSpeed(id)
{
    
set_user_maxspeed(idget_user_maxspeed(id) +(20*SpeedLevel[id]));
}

public 
TakeDamage(victiminflictorattackerFloat:damagedamagebits)
{
    if(
victim != attacker)
        if(
DamageLevel[attacker] > 0)
            
SetHamParamFloat(4damage * (1.0 + (DamageLevel[attacker] * 0.2)));
}

public 
Killed(victiminflictorattacker)
{
    new 
Chance random_num(0100);
    
    if(
RespawnLevel[victim]*>= Chance && !GameOver(get_user_team(victim) == "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_RoundRespawnid);
}

public 
NeverEndingRegen()
{
    new 
players[32], num;
    
get_players(playersnum"ach");
    
    for(new 
id;id num;id++)
    {
        new 
players[id];
        if(
RegenLevel[i] > && !Refreshing[id])
        {
            if((
get_user_health(i) + RegenLevel[i]) > MaxHealth[i]) set_user_health(iMaxHealth[i]);
            else 
set_user_health(iget_user_health(i) + RegenLevel[i]);
        }
    }

here are all of the powers code maybe this will help
Mr.J is offline