18.05.2010, 16:08
For connection logging purposes, how would you recommend getting a player's ip address (GetPlayerIp) when they disconnect from the server (OnPlayerDisconnect)?
Right now OnPlayerDisconnect I am forwarding the playerid to a custom function that executes mysql and GetPlayerIp, and it appears that sometimes it can capture it before the player completely disconnects, but many times the player is already disconnected and it returns 255.255.255.255 which is no good.
Ideas?
Would it work 100% if I GetPlayerIp under OnPlayerDisconnect, and then forward the ip address to the function instead of getting it in the function?
Right now OnPlayerDisconnect I am forwarding the playerid to a custom function that executes mysql and GetPlayerIp, and it appears that sometimes it can capture it before the player completely disconnects, but many times the player is already disconnected and it returns 255.255.255.255 which is no good.
Ideas?
Would it work 100% if I GetPlayerIp under OnPlayerDisconnect, and then forward the ip address to the function instead of getting it in the function?