samp-weapon-config
samp-weapon-config copied to clipboard
death animation is playing only for who is dying
the wounded animation is applying normally for both players, however when a player in the wounded state receives a shot, the animation appears to be reapplied with each shot, however it remains normal for whoever is receiving the hits, and when the player dies, the animation applies normally for him, but it is not visible to whoever killed him, whoever killed him only sees him standing still
static BitArray: gPlayerWounded<MAX_PLAYERS>;
public OnPlayerPrepareDeath(playerid, animlib[32], animname[32], &anim_lock, &respawn_time) {
if (!Bit_Get(gPlayerWounded, playerid)) {
animlib = "sweet";
animname = "sweet_injuredloop";
anim_lock = true;
respawn_time = 250;
Bit_Let(gPlayerWounded, playerid);
return 1;
}
Bit_Vet(gPlayerWounded, playerid);
animlib = "wuzi";
animname = "cs_dead_guy";
return 1;
}
public OnPlayerDeathFinished(playerid, bool: cancelable) {
return Bit_Get(gPlayerWounded, playerid);
}