How to check is player offline - 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: How to check is player offline (
/showthread.php?tid=559553)
How to check is player offline -
bigboy81 - 24.01.2015
How i can check is player offline and do something with that?
Respuesta: How to check is player offline -
Zume - 24.01.2015
If none of connected players has a certain name or something? I do not understand.
Re: How to check is player offline -
bigboy81 - 24.01.2015
I want make script delete player fist every 2hours if player not here,but i need some function who will detect is player offline..
Re: How to check is player offline -
HeLiOn_PrImE - 24.01.2015
You can't.
A connected player will have and id (playerid). When the player exists, that ID is deleted and will be assigned to the next player who enters the server. Each player receives the lowest possible ID.
When a player disconnects, he basically stops existing from the server's point of view. "playerid" won't be assigned to him anymore, so you can't have functions for offline players.
The only way you can achieve old account deletion, is with an SQL database.
Re: How to check is player offline -
bigboy81 - 24.01.2015
Can i make if the inactivity time bigger than lastlogin time server sell his fist ?
Because i learning about mysql plugin yet,and for start i making easy,for next time i will make via MYSQL
Re: How to check is player offline -
Abagail - 24.01.2015
You can use ReturnUser / sscanf, although it can be inaccurate sometimes. It should how-ever suffice for your purpose. If no results come up then:
a - they aren't registered, etc.
b - they are offline