Konijima Posted July 8, 2022 Share Posted July 8, 2022 (edited) Suggestion to make it a bit easier for server mods to handle some of the situation. Most of it is doable in a hacky way but having those in the core engine would just make it cleaner and more efficient for us. EVENTS: OnServerPlayerConnected (playerObj, isNewPlayer) When the player officially connected to the server, passing a parameter to inform if it's a brand new player. Use cases: Show a message, an existing player has connected. Show a message, a new player has connected. Do something every time a player join. Do something one-time only when a new player joined for the first time. ___________________________________________ OnServerPlayerDisconnected (playerObj, reason) When the player has left the server, passing a parameter to inform the reason of leaving. (Logged Out, Kicked, Banned, Unknown/Crash) Use cases: Show a message, a player has left and why. Do something special when a player disconnect based on the reason. ___________________________________________ OnServerPlayerSpawned (playerObj, isNewCharacter) Similar to OnServerPlayerConnected but also trigger after re-spawning a new character (after death). Use cases: Do something every time a player spawn. Do something when a player spawn with a new character. ___________________________________________ OnServerPlayerDied (playerObj, reason) Trigger when a player has died, potentially add the cause of the death. Use cases: Show a message, when a player died and why. Do something every time a player died. Edited July 8, 2022 by Konijima Added use cases. Fixed typo. duh7 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now