new Actor;
CMD:npc(playerid, params[])
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
Actor = CreateActor(21, X, Y, Z+2, 90.0);
SetActorInvulnerable(Actor, false);
SetActorHealth(Actor, 100);
return 1;
}
public OnPlayerGiveDamageActor(playerid, damaged_actorid, Float: amount, weaponid, bodypart)
{
ApplyActorAnimation(Actor, "WUZI", "CS_DEAD_GUY", 4.1, 0, 0, 0, 0, 0);
return 1;
}
new Actor;
Because 'Actor' variable holds only the last actor ID, you gotta make it 1d array at least and loop through the variable to apply it for all the actors.
|
public OnPlayerGiveDamageActor(playerid, damaged_actorid, Float: amount, weaponid, bodypart)
{
ApplyActorAnimation(damaged_actorid, "WUZI", "CS_DEAD_GUY", 4.1, 0, 0, 0, 0, 0);
return 1;
}