Resume where you stop
#1

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
Reply
#2

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.
Reply
#3

Save time to player file or account
Reply
#4

Yes i know that but when i connect to server if my jailed time 45min
server set smaller..
hmm
Reply
#5

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
		}
	}
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)