OnPlayerGiveDamageActor not called
#1

Hi,

I'm making a sort of shooting range script using actors and objects, but OnPlayerGiveDamageActor isn't called, no animation was applied to the actor and I set them to be vulnerable, and yes, I restreamed them.

A small piece of code:

Код:
ReloadActor(Actors[aID][ActorID]);
SetActorInvulnerable(Actors[aID][ActorID], false);
ReloadActor just destroys and re-creates the actor, essentially re-streaming it.

Код:
printf("Actor dmg: %i %i %f %i %i", playerid, damaged_actorid, amount, weaponid, bodypart);
And I placed that in the first line under OnPlayerGiveDamageActor, and it doesn't get called.

Any help is much appreciated!
Reply
#2

https://sampwiki.blast.hk/wiki/SetActorInvulnerable

Quote:

Players will have actor's invulnerability state changed only when it is restreamed to them.

try teleporting the actor away and back to his pos after setting the SetActorInvulnerable.
or go away untl he streams out then back to him so he would be re-streamed and check if the problem's caused by that.
Reply
#3

Nope, doesn't work. The actor bulges when I shoot it, but no damage is registered somehow.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)