[Bug/SRV 0.3.7] Actor dies of Molotov,flamethrower
#4

Quote:
Originally Posted by long76
Посмотреть сообщение
you can fix it!
pawn Код:
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
        if(weaponid==37)amount=9;
        SetActorHealth(damaged_actorid, health-amount); //Apply damage, set new health
    }
    return 1;
}
wiki
pawn Код:
The weaponid will return 37 (flame thrower) from any fire sources (e.g. molotov, 18)
It is not my bug fixes. When I shoot the actor from the flamethrower or Molotov he falls to the ground

P.S.:
If worked
PHP код:
OnPlayerGiveDamageActor (playeriddamaged_actoridFloatamountweaponidbodypart); + SetActorInvulnerable (actoridtrue); 
I process myself to damage.

But the function does not return if the switches on
PHP код:
SetActorInvulnerable(actoridtrue); 
Reply


Messages In This Thread
[Bug/SRV 0.3.7] Actor dies of Molotov,flamethrower - by Logofero - 08.05.2015, 07:34
Re: [Bug/SRV 0.3.7] Actor dies of Molotov,flamethrower - by long76 - 08.05.2015, 11:34
Re: [Bug/SRV 0.3.7] Actor dies of Molotov,flamethrower - by Logofero - 08.05.2015, 18:49
Re: [Bug/SRV 0.3.7] Actor dies of Molotov,flamethrower - by Logofero - 09.05.2015, 01:11
Re: [Bug/SRV 0.3.7] Actor dies of Molotov,flamethrower - by long76 - 09.05.2015, 06:07
Re: [Bug/SRV 0.3.7] Actor dies of Molotov,flamethrower - by Logofero - 09.05.2015, 08:42

Forum Jump:


Users browsing this thread: 4 Guest(s)