#4

In my mind, it would be

PHP код:

new bool:jailed;
if(
jailed// Save the var to 1 in the player stats
else // Save the var to 0 in the player stats 
Another method working, which reffer to yours but which wastes less performances : (I consider that the "time" var already contains the jailtime in minutes)

PHP код:

new jailtime[MAX_PLAYERS] = 0;
// In the jail command
jailtime[targetid] = gettime() + time*60// If time is already in seconds, don't multiply per 60
// Save the jailtime var in the targetid stats, and when he connects, after data loading
if(jailtime[playerid] > gettime()) Jail(playerid); 
I guess you know the gettime() function, so of course it's better performances than setting a timer whichs repeats every seconds.
Reply


Messages In This Thread
Help - by JakeHunter1 - 30.05.2014, 18:35
Re : Help - by S4t3K - 30.05.2014, 18:58
Re: Re : Help - by JFF - 30.05.2014, 19:04
Re : Help - by S4t3K - 30.05.2014, 19:12
Re: Help - by JakeHunter1 - 30.05.2014, 19:14
Re : Help - by S4t3K - 30.05.2014, 19:17
Re: Help - by JakeHunter1 - 30.05.2014, 19:33
Re : Help - by S4t3K - 30.05.2014, 19:37
Re: Re : Help - by JakeHunter1 - 30.05.2014, 19:41
Re : Help - by S4t3K - 30.05.2014, 19:55

Forum Jump:


Users browsing this thread: 2 Guest(s)