Is it possible to tell the difference between when player connects to the server from elsewhere, and
1 replies, posted
I'm trying to send a message to players whenever they connect to the server per session, but it seems like the connect hook is called for each player after a map switch. Unless I'm doing it wrong.
It's actually quite confusing, because the hook "PlayerDisconnected" isn't called on map switch, but "PlayerConnect" is called when you load into the new map. Maybe it's because "PlayerConnect" hook is shared, while "PlayerDisconnected" is server only? I'm not sure. In any case, I'm stumped.
You could set a Boolean variable in the player that only changes on PlayerDisconnect, then check that before you send the message. If its false, set it to true?
Sorry, you need to Log In to post a reply to this thread.