Problem with Deathsystem
#2

i havent looked at your code properly but the answer is quite simple

Код:
new Death[MAX_PLAYERS]; // Top of the script

public OnPlayerConnect(playerid)
{

Death[playerid] = 0; // make sure the death id is 0 on connect
}

public OnPlayerDeath(playerid)
{

Death[playerid] = 1; // set the player's id to dead
}

public OnPlayerSpawn(playerid)
{

if (Death[playerid] == 1)
{
  // spawn them at the hospital
  Death[playerid] = 0; // reset the value for the next death
}
}
hope this helps
Reply


Messages In This Thread
Problem with Deathsystem - by Stas92 - 05.10.2009, 12:40
Re: Problem with Deathsystem - by Beaver07 - 05.10.2009, 14:36
Re: Problem with Deathsystem - by Stas92 - 05.10.2009, 15:19
Re: Problem with Deathsystem - by Jofi - 05.10.2009, 15:33
Re: Problem with Deathsystem - by Stas92 - 05.10.2009, 15:57

Forum Jump:


Users browsing this thread: 1 Guest(s)