Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

death animation is playing only for who is dying #279

Open
Vel30 opened this issue Dec 9, 2023 · 0 comments
Open

death animation is playing only for who is dying #279

Vel30 opened this issue Dec 9, 2023 · 0 comments

Comments

@Vel30
Copy link

Vel30 commented Dec 9, 2023

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);
}
@Vel30 Vel30 changed the title the death animation is playing only for who is dying death animation is playing only for who is dying Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant