Jump to content

【HELP】HOW TO MONITOR 'LOGOUT' EVENT ?


Recommended Posts

A very simple requirement, how to monitor the 'logout' event ?

I try to record the player(including myself) who leaving the game in my log file by below function:

Spoiler

local function OnPlayerLeft(src,player)
    for i, v in ipairs(AllPlayers) do
        if v == player then
   print("Player ", v, "left")           
        end
    end
end

But I couldn't find any event for the listener to trigger above function.  Anyone can help ?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...