PDA

View Full Version : Problem with count time


ZaBraNjeNi
08/01/2015, 05:59 PM
Hi,

Problem is when player relog to server time is same:
http://i.imgur.com/k0AvKe1.png
I want, when player disconnect from server his "Current Online Time" to reset.
format(string, sizeof(string), ""white"Current Online Time: "grey"%02d:%02d:%02d\n", g_time[targetid][2], g_time[targetid][1], g_time[targetid][0]);
strcat(string2, string);
format(string, sizeof(string), ""white"Total Online Time: "grey"%02d:%02d:%02d\n", User[targetid][accountGame][2], User[targetid][accountGame][1], User[targetid][accountGame][0]);
Thanks.

HY
08/01/2015, 07:20 PM
public OnPlayerConnected(playerid)
{
g_time[playerid][2] = 0;
g_time[playerid][1] = 0;
g_time[playerid][0] = 0;
return 1;
}

ZaBraNjeNi
08/01/2015, 08:44 PM
Thanks.
+REP.