SA-MP Forums Archive
Problem with count time - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem with count time (/showthread.php?tid=555720)



Problem with count time - ZaBraNjeNi - 08.01.2015

Hi,

Problem is when player relog to server time is same:

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.


Re: Problem with count time - HY - 08.01.2015

pawn Код:
public OnPlayerConnected(playerid)
{
    g_time[playerid][2] = 0;
    g_time[playerid][1] = 0;
    g_time[playerid][0] = 0;
    return 1;
}



Re: Problem with count time - ZaBraNjeNi - 08.01.2015

Thanks.
+REP.