Jump to content
Sign in to follow this  
Heaney

Detect when player leaves slot (goes back to lobby)

Recommended Posts

So I'm trying to use "disableChannels[]={6};" to remove all the annoying messages, and replace them with a simple "<player> joined the game" and "<player> left the game".

The "joined the game" works perfectly by just having it happen on player init, but how can I detect when the player leaves a slot?

Share this post


Link to post
Share on other sites
Maybe try onPlayerDisconnected

I'm not sure when it's triggered tho. Could be when the player leaves the server entirely.

I was thinking the same, but couldn't find anything that confirmed if that was at mission start or when you connect to the lobby.

Share this post


Link to post
Share on other sites

Pretty sure onPlayerConnected and onPlayerDisconnected trigger when a player enters/leaves the mission.

Edited by Deadfast

Share this post


Link to post
Share on other sites

I didn't know about those commands. Those work perfectly, thanks!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×