03.10.2009, 17:29
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:
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
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
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?
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 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);
Код:
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);