y_timers when to use and wen not to use!
#1

  • Player Timers
How can i use this specific timer for players how much time a player has spent playing in a typical game-server.
Quote:

Example:
when player has logged-in into his/hers load's his time spent and proceeding with the timer, later on when the player left the server by quitting saving time and killing the player timer for each specific player

player function i'm using for now, testing purpose

Код:
ptask PlayingTime[1000](playerid)
{
	if(IsPlayerConnected(playerid))
	{
	    Player[playerid][Seconds]++;
		if(Player[playerid][Seconds] == 59)
		{
		    Player[playerid][Seconds] = 0;
		    Player[playerid][Minutes]++;
		}
		else if(Player[playerid][Minutes] == 59)
		{
		    Player[playerid][Minutes] = 0;
		    Player[playerid][Hours]++;
		}
	}
	return 1;
}
also should i change the operators?
Reply


Messages In This Thread
y_timers when to use and wen not to use! - by Mobtiesgangsa - 31.01.2019, 23:53
Re: y_timers when to use and wen not to use! - by Pottus - 01.02.2019, 01:10
Re: y_timers when to use and wen not to use! - by Mobtiesgangsa - 01.02.2019, 01:21
Re: y_timers when to use and wen not to use! - by Calisthenics - 01.02.2019, 07:49

Forum Jump:


Users browsing this thread: 1 Guest(s)