4 Little Questions
#4

4. add a global variable called pHasDied[MAX_PLAYERS] or something like that.
then under OnPlayerDeath put
pawn Код:
pHasDied[playerid] = 1;
and under OnPlayerSpawn put
pawn Код:
if(pHasDied[playerid] == 1)
{
  SetPlayerPos(...);
  //You do the rest
  pHasDied[playerid] = 0;
}
You should also set the variable in connect and disconnect:
pawn Код:
public OnPlayerConnect(playerid)
{
  pHasDied[playerid] = 0;
  return true;
}
public OnPlayerDisconnect(playerid)
{
  pHasDied[playerid] = 0;
  return true;
}
Reply


Messages In This Thread
4 Little Questions - by DeltaAirlines12 - 15.11.2009, 17:17
Re: 4 Little Questions - by dirkblok - 15.11.2009, 17:53
Re: 4 Little Questions - by Peter_Corneile - 15.11.2009, 17:57
Re: 4 Little Questions - by LarzI - 15.11.2009, 18:00
Re: 4 Little Questions - by killer98p - 15.11.2009, 19:42
Re: 4 Little Questions - by DeltaAirlines12 - 16.11.2009, 01:08
Re: 4 Little Questions - by killer98p - 16.11.2009, 04:38

Forum Jump:


Users browsing this thread: 1 Guest(s)