View Single Post
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 10-23-2018 , 17:20   Re: How to set SDKHook on round_start correctly?
Reply With Quote #8

Quote:
Originally Posted by Dragokas View Post
8guawong, thanks. You are right. I made a problem myself by Unhooking on "disconnect" reason.
I thought player_team set that reason when player is really disconnect from the server.

Looks like my main question is over. After hooking it once, engine never unhook it again itself.

So, how to recognize is it disconnection because client quit the game or because map ends?
OnClientDisconnect() forward is also called for all clients just right before map ends.

EDIT.
Ohh, MasterMind, Crasher, thanks too.
You could try using the player_disconnect event. It's only called when a player disconnects from the server, so it shouldn't be called across map change. Same with the player_connect event.
__________________
Psyk0tik is offline