Resume where you stop - 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: Resume where you stop (
/showthread.php?tid=568771)
Resume where you stop -
bigboy81 - 25.03.2015
how is possible to make when is player in jail and its 45 min in jail
when he quit from server,when again connect his time are smaller then 45 min or bigger.
How i can make time counting where are stoped.
If anybody understand me what i want..
ROFL XD
Re: Resume where you stop -
The__ - 25.03.2015
You will need,
PlayerInfo[playerid][pJailed],
PlayerInfo[playerid][pJailTime]
or whatever you wish, you must store the time in pJailTime and have a timer running.
Re: Resume where you stop -
Jefff - 25.03.2015
Save time to player file or account
Re: Resume where you stop -
bigboy81 - 25.03.2015
Yes i know that but when i connect to server if my jailed time 45min
server set smaller..
hmm
Re: Resume where you stop -
X337 - 25.03.2015
Make a timer to decrease jail time
Example:
Код:
SetTimer("jailTimer", 1000, true);
forward jailTimer();
public jailTimer()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][jailTime] > 0)
{
PlayerInfo[i][jailTime]--;
}
if(PlayerInfo[i][jailTime] == 0)
{
// Release From jail
}
}
}