Closed AlienXAXS closed 10 years ago
Yeah this is a known problem and is the result of our early code with events. We started work on events long before we had any mapping in the API to link a player's steamid and player id to any in-game objects.
We will be overhauling this eventually and the events will be as such:
OnPlayerJoined - Player joins server OnPlayerLeft - Player leaves server OnCharacterCreated - Character entity is created OnCharacterDeleted - Character entity is disposed
I'll be sure that this issue is updated once the new events have been setup in the API.
Thanks Chessmaster, this is brilliant news :)
Completed in 98d4a9e932d640fab6e0822f023b778861e01e2a
Note: The player join/leave events do nothing now as the original function has been moved to the character events. Will have these functional soon though.
Feature is fully complete and new player events have been finished and tested.
Perhaps not the best name, but OnPlayerLeft gives the idea that the player has left the server - OnPlayerLeft is called as the player object is disposed of, however the player object is disposed of whenever that player enteres a cockpit - thus calling the OnPlayerLeft event. (works every time on the cockpit that you start off with on Easy Start 1 that's attached to the station)
OnPlayerJoined also fires when a player leaves the cockpit.
Perhaps also, a OnPlayerJoinedServer and OnPlayerLeftServer events could be created and fired only when a player acctually leaves and joins the server.
I hope this makes sense :)