OnPlayerGiveDamageActor - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerGiveDamageActor (
/showthread.php?tid=604169)
OnPlayerGiveDamageActor -
ScIrUsna - 01.04.2016
Код:
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);
return 1;
}
I was hitting actor with Brass Knuckles with weapon: was empty no name or smth why?
And too i set actor health to 100, but i'am hitting him and he is not dying or i need to script to my self destroyactor?
Re: OnPlayerGiveDamageActor -
oMa37 - 01.04.2016
Did you check if the Actor vulnerable or invulnerable?
SetActorInvulnerable