SA-MP Forums Archive
Do not allow to teleport or 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Do not allow to teleport or spawn. (/showthread.php?tid=225025)



Do not allow to teleport or spawn. - FreЉ - 12.02.2011

So today i made a Jail script. Basicly you kill a team mate and you go to jail. Buy player still can teleport avay from the jail. How can i turn off teleports for someone who's in Jail?

In my server you have to login before spawning. If you don't after spawning you imideatly die. How can i not allow player to leave the selection screen?


Re: Do not allow to teleport or spawn. - int3s0 - 13.02.2011

For stop jail evading use:
On top
pawn Код:
new Jailed[MAX_PLAYERS];
When you jail player
pawn Код:
Jailed[playerid2] = 1;
When you un jail player
pawn Код:
Jailed[playerid2] = 0;
OnPlayerCommandText
pawn Код:
if(Jailed[playerid] == 1) return GameTextForPlayer(playerid,"~r~YOU ARE JAILED!",3000,3);