Log to a file when player joins or leaves

Diox

New Member
Hi,

Anyone know if it is possible to change a file on the system whenever a player joins or leaves adding or removing their name?

In short, what I need is a way to write to a file of my choice on a logon or disconnect event.

This is gonna be used for live statistics showing online players on a web page.

I know I could use MySQL for this, selecting users from Character_DATA that have lastUpdated from within the last five minutes or so, but that will always cause a small delay. I want it to be 100% live.
 
Thanks for the suggestion, but it's much harder to parse such logs. For this I will have to parse the whole log to figure out which users have connected without disconnected by counting their connects vs their disconnects.
This is not really effective as this is a script that will be ran on every page refresh.
 
using callExtension this should be doable fairly easy, as long as we are talking about character strings. but as i understand this is the case in your situation.

the file will be written record by record (line by line). lets say whenever somebody logs in you write such a record to the file. no big deal to add this to server_playerLogin.sqf or server_playerSetup.sqf. just add this to the script of your choice and write the info using diag_log to the .rpt file. i could come back with a .dll that writes this data to a different file instead.

let me know if you are interested.
 
Back
Top