Duplicate Actors bug
#2

maybe better recreated actors in OnPlayerGiveDamageActor
pawn Код:
public OnPlayerGiveDamageActor(playerid, damaged_actorid, Float: amount, weaponid, bodypart)
{
 
    if(!IsActorInvulnerable(damaged_actorid)) //Check if actor is vulnerable
    {
        new Float:health;
        GetActorHealth(damaged_actorid, health); //Get current health
        SetActorHealth(damaged_actorid, health-amount); //Apply damage, set new health
        if( (health-amount)<= 0.0)
       {
new Float:x,Float:y,Float:z;
                    GetActorPos(ActorID,x,y,z);
                    DestroyActor(ActorID);
                    ActorID=CreateActor(ActorSkin,x,y,z,ActorAngle[i]);
}
    }
    return 1;
}
Reply


Messages In This Thread
Duplicate Actors bug - by Admigo - 04.05.2015, 15:57
Re: Duplicate Actors bug - by long76 - 04.05.2015, 16:52
Re: Duplicate Actors bug - by Pizzy - 06.05.2015, 00:24

Forum Jump:


Users browsing this thread: 1 Guest(s)