Checking hours
#2

Just set up a timer which increases a variable every second/minute.

Like:

Код:
new pOnlineTime[MAX_PLAYERS];

SetTimerEx("OnlineTime",  1000, 1, "i", playerid);

foward OnlineTime(playerid)
public OnlineTime(playerid)
{
      pOnlineTime[playerid]++;
      return 1;
}
You can do the same with minutes of course which is probably better.
Then calculate the hours from the minutes/seconds.
Reply


Messages In This Thread
Checking hours - by Crystallize - 14.07.2015, 15:53
AW: Checking hours - by FSAOskar - 14.07.2015, 16:03
Re: Checking hours - by Vince - 14.07.2015, 16:21
AW: Checking hours - by FSAOskar - 14.07.2015, 16:40
Re: Checking hours - by Orsini24 - 14.07.2015, 16:50
Re: Checking hours - by Crystallize - 14.07.2015, 17:59

Forum Jump:


Users browsing this thread: 1 Guest(s)