SA-MP Forums Archive
Players sometimes crash on SPAWN. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Players sometimes crash on SPAWN. (/showthread.php?tid=609245)



Players sometimes crash on SPAWN. - Dokins - 10.06.2016

pawn Код:
SetPlayerVirtualWorld(playerid, LastVW[playerid]);
            SetPlayerInterior(playerid, LastInt[playerid]);
            SetSpawnInfo(playerid, 0, skin, LastX[playerid], LastY[playerid], LastZ[playerid]+0.5,0, 0,0,0,0,0,0);
            SpawnPlayer(playerid);
            SetCameraBehindPlayer(playerid);
            SpawnTimer[playerid] = SetTimerEx("SpawnTime", 2500, 0, "i", playerid);
            SendClientMessage(playerid, COLOUR_RED, "You have been returned to your previous position.");
Basically, this sometimes crashes players when they try and spawn and I have to /ajail them to stop this bug to happen.
pawn Код:
forward SpawnTime(playerid);
public SpawnTime(playerid)
{
    if(SpawnTimer[playerid] == 0)
    {
        TogglePlayerControllable(playerid, 1);
        Streamer_Update(playerid);
    }
    return 1;
}
pu