pawn Код:
new calc = LastLogin[playerid] - 300;
if(LastLogin[playerid] > calc)
{
switch(UsingSpawn[playerid])
{
case 0:
{
SetSpawnInfo(playerid, 0, skin,810.7388,-1339.9355,13.5384,46.7076 + 0.3, 0,0,0,0,0,0);
SpawnPlayer(playerid);
SetCameraBehindPlayer(playerid);
}
case 1:
{
SetSpawnInfo(playerid, 0, skin,SpawnX[Faction[playerid]], SpawnY[Faction[playerid]], SpawnZ[Faction[playerid]],90, 0,0,0,0,0,0);
SpawnPlayer(playerid);
SetCameraBehindPlayer(playerid);
}
case 2:
{
for(new hs = 1; hs < MAX_HOUSES; hs++)
{
if(HouseOwner[hs] == PlayerSQLID[playerid])
{
SetSpawnInfo(playerid, 0, skin, HouseEntX[hs], HouseEntY[hs], HouseEntZ[hs], 90, 0,0,0,0,0,0);
SpawnPlayer(playerid);
SetCameraBehindPlayer(playerid);
break;
}
}
}
}
}
if(LastLogin[playerid] < calc)
{
SetPlayerVirtualWorld(playerid, LastVW[playerid]);
SetPlayerInterior(playerid, LastInt[playerid]);
SetSpawnInfo(playerid, 0, skin, LastX[playerid], LastY[playerid], LastZ[playerid],0, 0,0,0,0,0,0);
SpawnPlayer(playerid);
SetCameraBehindPlayer(playerid);
}
For some reason it always returns them to the default spawn.
Could someone kindly point out what I'm doing wrong.
LastLogin is definitely saving correctly.