You wanna change quit reason text?
Then:
addEventHandler ( 'onPlayerQuit', root,
function ( reason )
if ( reason == 'Quit' ) then
reason = 'Left';
elseif ( reason == 'Timed out' ) then
reason = 'Lost connection';
-- more and more
end
end
)
I think this work too:
local reasons =
{
[ 'Quit' ] = 'Left';
[ 'Timed out' ] = 'Lost Connection';
}
addEventHandler ( 'onPlayerQuit', root,
function ( reason )
if ( reasons [ tostring ( reason ) ] ) then
reason = reasons [ tostring ( reason ) ] [ 1 ]
outputChatBox ( getPlayerName ( source ) .. 'left the game. Reason: ' .. reason, root, 255, 255, 255, false );
end
end
)