SA-MP Forums Archive
Connected 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: Connected time (/showthread.php?tid=636466)



Connected time - Cyboorg - 27.06.2017

How to save players connected time on my server
Online time they spended on last login session,and total time they have spent in server?!



Re: Connected time - JasonRiggs - 27.06.2017

Save it inside the INI if you have a payday system, add a 1 hour or whatever in the player's ini.


Re: Connected time - Abagail - 27.06.2017

Use timestamps. Save the timestamp at login and compare upon disconnect. Example where pPlayerConnectTime is the timestamp of when they joined or logged in (which needs to be done by you).

pawn Код:
connect_time = gettime() - pPlayerConnectTime[playerid];



Re: Connected time - Cyboorg - 27.06.2017

How to get their connect time,and add them in the ini file ++ ?


Re: Connected time - ValueA - 27.06.2017

Maybe u can't? u have to add it first.