samp-weapon-config
samp-weapon-config copied to clipboard
Death animation in Stream In
When one dead player is shown to another, the animation is not that of death. I believe this piece of code was made to fix this, but it's not working properly.
public OnPlayerStreamIn(playerid, forplayerid)
{
// Send ped floor_hit_f
if (s_IsDying[playerid]) {
SendLastSyncPacket(playerid, forplayerid, .animation = 0x2e040000 + 1150);
}
return WC_OnPlayerStreamIn(playerid, forplayerid);
}
Seems I found the cause: SendLastSyncPacket doesn't set any animations at all if send it on any player (and no matter which anim ID I was trying to set with it). This is not Pawn.RakNet nor SKY implementation fault, because it doesn't work on both, so I doubt it needs to open an issue in SKY repo. I think native SendDeath
will work to show a dead player for others (could be also done in Pawn.RakNet implementation), but I suppose Slice initially not used it because weapon-config can cancel any serverside death (for example, if you were killed by a player who used C-bug and it wasn't allowed, your death will be cancelled and health/armour will be restored). So, pretty doubtful that SendDeath can be cancelled for others as simple as it's now just by doing ClearAnimations for this "dead" player.