Players are unjailed after reconnect - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Server (
https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (
https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Players are unjailed after reconnect (
/showthread.php?tid=486823)
Players are unjailed after reconnect -
NickTaSpy - 10.01.2014
Hello there, I am using the LuxAdmin system and I've been trying to figure out how I can save the player's remaining jail time OnPlayerDisconnect and then load it back in OnPlayerConnect so I can put them back in jail for the remaining amount of time when they spawn after they reconnect. I've been searching for about an hour using SA:MP wiki and the forums but I've had no luck with that so that's why I am posting a new thread. +rep to the ones who will really help me!
P.S. Don't suggest me to create my own Admin system or find another
Re: Players are unjailed after reconnect -
Mr.Faqahat - 10.01.2014
Under OnPlayerSpawn(playerid)
Код:
if(AccInfo[playerid][Jailed] == 1) {
SetTimerEx("JailPlayer",3000,0,"d",playerid);
return SendClientMessage(playerid,red,"{F81414}|-{F3FF02} You cant escape your punishment. You Are Still In Jail -|");
}
Edited.
Re: Players are unjailed after reconnect -
NickTaSpy - 11.01.2014
Quote:
Originally Posted by Mr.Faqahat
Under OnPlayerSpawn(playerid)
Код:
if(AccInfo[playerid][Jailed] == 1) {
SetTimerEx("JailPlayer",3000,0,"d",playerid);
return SendClientMessage(playerid,red,"{F81414}|-{F3FF02} You cant escape your punishment. You Are Still In Jail -|");
}
Edited.
|
That won't reput players in jail after reconnect to the server
Re: Players are unjailed after reconnect -
OsteeeN - 11.01.2014
Quote:
Originally Posted by NickTaSpy
That won't reput players in jail after reconnect to the server
|
Well, just add a "SetPlayerPos" line or Jail(playerid, 10000); (if you have an method for jailing players, just an example)
Respuesta: Players are unjailed after reconnect -
Stront - 11.01.2014
I don't know how that system works. The firsts posts should be fine adding the teleports and jail command, but before that you have to figure a system to save the player stats, in special the jail status and set it to "VALUE" and update this "VALUE" when disconnecting the server.
Re: Players are unjailed after reconnect -
NickTaSpy - 11.01.2014
And which is the easiest way to save the remaining jail time/jail status into a file?