SA-MP Forums Archive
[HELP] Last online feature - 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: [HELP] Last online feature (/showthread.php?tid=497340)



[HELP] Last online feature - SyntaxQ - 26.02.2014

I want to create a feature which will show the player's last login when the player logs in (the next time):
You were last active on 25/2/14.

Can anybody please tell me how can I make this feature? I have already tried something similar with gettime(...) and storing it but it didn't work.


Re: [HELP] Last online feature - [XST]O_x - 26.02.2014

Why didin't it work? It's the only way to do it.
Check the date and time on OnPlayerDisconnect and convert it to dd/mm/yyyy hh:mm format. Store it as a string using any file managment system and when the player connects display it back.


Re: [HELP] Last online feature - SyntaxQ - 26.02.2014

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
Why didin't it work? It's the only way to do it.
Check the date and time on OnPlayerDisconnect and convert it to dd/mm/yyyy hh:mm format. Store it as a string using any file managment system and when the player connects display it back.
Thanks! I was doing it on the LOGIN_DIALOG, that is why it didn't work. I'll try it on OnPlayerDisconnect.