SA-MP Forums Archive
ID 0 BUG - 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: ID 0 BUG (/showthread.php?tid=567481)



ID 0 BUG - DeitY - 14.03.2015

Hi, i have problem with players who's ID is assigned to 0. Basically, they get random teleported to some location (mostly jail), and its only happening to ID 0 . I've searched for some topics but couldn't find anything usefull.

If anyone knows some solution please let me know.

Thanks!


Re: ID 0 BUG - WeirdestYeti - 14.03.2015

Do you have some function witch teleports players to jail? If you do then post it.


Re: ID 0 BUG - DeitY - 14.03.2015

//onplayerdisonnect

Setplayerpos Randomzatvor - random location of jail.

stavljenelisice/zavezan/tazovan = if hes tied/cuffed/tazzzed and leaves server to be in jail.

if(StavljeneLisice[playerid] > 0 || Zavezan[playerid] > 0 || IgracTazovan[playerid] > 0)
{
PlayerInfo[playerid][pZatvor] = 2;
PlayerInfo[playerid][pZatvorenVreme] = PlayerInfo[playerid][pTrazeniLevel] * 150 + 500;
new rand = random(sizeof(RandomZatvor));
new id;
SetPlayerPos(id, RandomZatvor[rand][0], RandomZatvor[rand][1], RandomZatvor[rand][2]);
SetPlayerColor(playerid, BELA2);
PlayerInfo[playerid][pTrazeniLevel] = 0;
}

//onplayerspawn
if(PlayerInfo[playerid][pZatvor] == 2)
{
new rand = random(sizeof(RandomZatvor));
SetPlayerPos(playerid, RandomZatvor[rand][0], RandomZatvor[rand][1], RandomZatvor[rand][2]);
SetPlayerInterior(playerid, 0);
SCMF(playerid,-1,""SIVA"[ANTI LTA] Vracas se na odsluzenje zatvorske kazne | Ostalo ti je jos %d sekundi!",PlayerInfo[playerid][pZatvorenVreme]);
TogglePlayerControllable(playerid, 0);
freeze[playerid] = SetTimerEx("Freeze",5000, false, "i", playerid);
return 1;
}