[CSGO] GetClientCount() returns wrong player count in OnClientDisconnect_Post
I want to get the amount of players when a player disconnects.
First I tried GetClientCount() inside "OnClientDisconnect" but it seemed to still count the player who disconnected so I tried it inside "OnClientDisconnect_Post" but it still seems to count the player who left. I know I could simply do GetClientCount()-1 but maybe I'm missing something. |
Re: [CSGO] GetClientCount() returns wrong player count in OnClientDisconnect_Post
I'm not sure if this will work, but you could also try a post-event hook on the player_disconnect event. This event only fires when a player disconnects from the server; the two other methods also fire when the server changes maps.
|
Re: [CSGO] GetClientCount() returns wrong player count in OnClientDisconnect_Post
I decided to stick with the GetClientCount()-1 solution since hooking on mapchange isn't a problem in my case.
Anyway, thank you for your efforts ;) |
All times are GMT -4. The time now is 00:50. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.