SA-MP Forums Archive
how to use dini save online player in to file every time player enter or out - 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 use dini save online player in to file every time player enter or out (/showthread.php?tid=472817)



how to use dini save online player in to file every time player enter or out - Chrisli520 - 30.10.2013

as said. i wanna save onplayers to op\onlineplayers.txt . how can i do that, every time when player connected or disconnected,


Re: how to use dini save online player in to file every time player enter or out - RayDcosta - 31.10.2013

first off, no one understood what u wrote just there.
i think what u mean to say is u want to make a log, a list of people as and when they come online / go offline.
well, thats pretty pointless, but if it helps u in any way, heres what u do....
NOTE: this is not DINI in any way, so idk why u wrote that in the title

under onplayerconnect
format a string in this manner
"%s(playername) %d(player ip) has logged in", playername, playerip
[use the log function to save it to onlineplayers.log]

and under onplayerdisconnect
"%s %d has logged off", playername, playerip
[use the log function to save it to offlineplayers.log]

NOTE: you need to define playername, playerip etc using getplayername, getplayerip functions etc.
if you have no idea whats going on, check out www.wiki.sa-mp.com 's functions list.
cheers