Detect if player is alive or dead?
#5

Or just use a global variable.

Код:
new isDeath[MAX_PLAYERS];

OnPlayerConnect( playerid )
{
  isDeath[playerid] = false;
  return 1;
}

OnPlayerDeath( playerid )
{
  isDeath[playerid] = true;
  return 1;
}

OnPlayerSpawn( playerid )
{
  isDeath[playerid] = false;
  return 1;
}
Now you can do something like:
Код:
if(isDeath[playerid])
{
  // He's dead, put code here.
}
else
{
  // He's not dead.
}
At least you don't have to use another timer that way.
Reply


Messages In This Thread
Detect if player is alive or dead? - by -Rebel Son- - 07.04.2010, 01:20
Re: Detect if player is alive or dead? - by cessil - 07.04.2010, 01:31
Re: Detect if player is alive or dead? - by -Rebel Son- - 07.04.2010, 03:03
Re: Detect if player is alive or dead? - by deather - 07.04.2010, 03:28
Re: Detect if player is alive or dead? - by GTA_Rules - 07.04.2010, 03:31
Re: Detect if player is alive or dead? - by -Rebel Son- - 07.04.2010, 15:51
Re: Detect if player is alive or dead? - by Joe_ - 07.04.2010, 16:09
Re: Detect if player is alive or dead? - by -Rebel Son- - 07.04.2010, 16:10
Re: Detect if player is alive or dead? - by dice7 - 07.04.2010, 16:51
Re: Detect if player is alive or dead? - by -Rebel Son- - 10.04.2010, 04:21

Forum Jump:


Users browsing this thread: 1 Guest(s)