Returning to Position after Death [0.3 Bug] ?
#1

Hi, i started testing my Server with the new RC-8. I used nearly the same Script for it as i used in 0.2, where everything just worked fine.
I justed changed the Lock System of the Cars as described in the sticked topic.
I found no problems with the version, except the Returning to your old Position after you crashed before. The Code , as i already said, worked in 0.2, its realy simple, like:
Код:
// -- OnPlayerDisconnect
	if(reason == 0)
	{
		GetPlayerPos(...);
		AnyVariable = true;
		// Save Variables to Database (works fine, see below)
	}
	
	// -- Login
	
	// Loading Variables from Database (works fine, tested it, loads the right Coord and the Variable)
	
	// -- OnPlayerSpawn
	
	if(AnyVariable)
	{
	  SendClientMessage(...); // The Message Shows
	  SetPlayerPos(...);
	  return 1;
	}
	// Normal Spawn here
So it loads and saves but doesnt work properly. I just spawn at the Position of my SetSpawnInfo which i use in /login to spawn the Player.
So my /login looks like this
Код:
SetSpawnInfo(playerid, pInfo[playerid][pTeam], pInfo[playerid][pSkin1], buInfo[gSpawn][buEntrancex], buInfo[gSpawn][buEntrancey], buInfo[gSpawn][buEntrancez], 1.0, -1, -1, -1, -1, -1, -1);
TogglePlayerSpectating(playerid,0);
SpawnPlayer(playerid);
I just always Spawn at the SetSpawnInfoPos, although i set the Pos in OnPlayerSpawn. But OnPlayerSpawn gets called, because i see the "Crash" Message. I already tried changing the SetPlayerSpawn part to
Код:
if(pInfo[playerid][pCrashed]) SetSpawnInfo(playerid, pInfo[playerid][pTeam], pInfo[playerid][pSkin1], pInfo[playerid][p_X], pInfo[playerid][p_Y], pInfo[playerid][p_Z], 1.0, -1, -1, -1, -1, -1, -1);
	else SetSpawnInfo(playerid, pInfo[playerid][pTeam], pInfo[playerid][pSkin1], buInfo[gSpawn][buEntrancex], buInfo[gSpawn][buEntrancey], buInfo[gSpawn][buEntrancez], 1.0, -1, -1, -1, -1, -1, -1);
Doesnt work neither. So i doint know whats wrong, because it worked fine with 0.2. Was SetSpawnInfo changed or something other related to this? Or does anybody else has this Problem?

Reply


Messages In This Thread
Returning to Position after Death [0.3 Bug] ? - by Doktor - 03.10.2009, 17:29
Re: Returning to Position after Death [0.3 Bug] ? - by ruarai - 04.10.2009, 01:25
Re: Returning to Position after Death [0.3 Bug] ? - by ruarai - 04.10.2009, 03:54
Re: Returning to Position after Death [0.3 Bug] ? - by Joe Staff - 04.10.2009, 06:18
Re: Returning to Position after Death [0.3 Bug] ? - by Andom - 04.10.2009, 08:42
Re: Returning to Position after Death [0.3 Bug] ? - by Doktor - 04.10.2009, 12:12
Re: Returning to Position after Death [0.3 Bug] ? - by Doktor - 04.10.2009, 13:29
Re: Returning to Position after Death [0.3 Bug] ? - by Doktor - 04.10.2009, 14:37

Forum Jump:


Users browsing this thread: