View Single Post
mad_hamster
Member
Join Date: Nov 2009
Old 08-18-2010 , 16:25   Re: Ban disconnected players
Reply With Quote #9

Quote:
Originally Posted by exvel View Post
Good plugin. But I recommend you to use player_disconnect event instead of OnClientDisconnect forward. The reason why player_disconnect is better because OnClientDisconnect calls for every client during the map change even if client didn't disconnect but player_disconnect event fires only when client is actually disconnected.
Thanks, I did that.

Quote:
Originally Posted by Silvers View Post
I think adding the line after this will help stop that?

PHP Code:
public OnClientDisconnect(client) {
if (
IsFakeClient(client)) return; 
Yes, but this doesn't work when listening to the disconnection event since the client is gone by then, so I check its steam id, if it doesn't start with "STEAM_" then it's not a human.

Quote:
Originally Posted by Groger View Post
Ty

you made a typo :

"item" "sm_ban"
"item" "sm_bandisconnected"

should be

"item" "sm_ban"
"item" "sm_ban_disconnected"
Hmm... nope, it's correct. The plugin name is ban_disconnected, but the admin command that it provides is "sm_bandisconnected". Sorry for the confusing names.
mad_hamster is offline