Actor Sync Bug
#9

Okay I've tried to kill the actor and then go over it with the infernus and everything worked fine. This is the code I've used:
pawn Code:
public OnPlayerGiveDamageActor(playerid, damaged_actorid, Float: amount, weaponid, bodypart)
{
    new string[128], attacker[MAX_PLAYER_NAME];
    new weaponname[24];
    GetPlayerName(playerid, attacker, sizeof (attacker));
    GetWeaponName(weaponid, weaponname, sizeof (weaponname));

    format(string, sizeof(string), "%s has made %.0f damage to actor id %d, weapon: %s", attacker, amount, damaged_actorid, weaponname);
    SendClientMessageToAll(0xFFFFFFFF, string);

    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
    }
    return 1;
}
Reply


Messages In This Thread
Actor Sync Bug - by dominik523 - 01.05.2015, 19:49
Respuesta: Actor Sync Bug - by Malganys - 01.05.2015, 20:35
Re: Actor Sync Bug - by Crayder - 01.05.2015, 21:49
Re: Actor Sync Bug - by IstuntmanI - 01.05.2015, 22:22
Re: Actor Sync Bug - by ikey07 - 01.05.2015, 22:40
Re: Actor Sync Bug - by Crayder - 01.05.2015, 23:06
Re: Actor Sync Bug - by dominik523 - 02.05.2015, 08:28
Re: Actor Sync Bug - by Crayder - 02.05.2015, 17:29
Re: Actor Sync Bug - by dominik523 - 03.05.2015, 08:19
Re: Actor Sync Bug - by Crayder - 03.05.2015, 17:51

Forum Jump:


Users browsing this thread: 1 Guest(s)