Raised This Month: $51 Target: $400
 12% 

catch log event "kick"


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 05-19-2011 , 16:30   catch log event "kick"
Reply With Quote #1

would be nice if someone could make me an short example or something (with reading data such as name/userid/steamid)

and also would this be triggered before or after client_disconnect?
jimaway is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-19-2011 , 19:56   Re: catch log event "kick"
Reply With Quote #2

Quote:
Originally Posted by jimaway View Post
would be nice if someone could make me an short example or something (with reading data such as name/userid/steamid)
Look in just about EVERY plugin on this forum. And/or here.

Quote:
Originally Posted by jimaway View Post
and also would this be triggered before or after client_disconnect?
userid is irrelevant in client_disconnect, the other two work.
__________________
fysiks is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 05-23-2011 , 10:42   Re: catch log event "kick"
Reply With Quote #3

PHP Code:
    register_logevent("player_kickedevent"2"0=Kick:"
this doesent seem to work, whats wrong with it?
jimaway is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 05-23-2011 , 11:28   Re: catch log event "kick"
Reply With Quote #4

I made some tests, it seems it doesn't detect kick logevent, I dunno why tough.
__________________
Hunter-Digital is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 05-23-2011 , 11:34   Re: catch log event "kick"
Reply With Quote #5

any other ways to detect if player is kicked?
jimaway is offline
dFF
sıɹɹoɥɔ ʞɔnu
Join Date: Oct 2009
Old 05-23-2011 , 12:16   Re: catch log event "kick"
Reply With Quote #6

I think You can't log event kick, but try with this:
PHP Code:
register_event"2" "event_kicked" "a" )

public 
event_kicked()
{
    
server_print"log event kicked" )

dFF is offline
DjOptimuS
Senior Member
Join Date: Jan 2009
Old 05-24-2011 , 00:12   Re: catch log event "kick"
Reply With Quote #7

for what do you need it exactly ? maybe we can find an alternative
DjOptimuS is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 05-24-2011 , 05:43   Re: catch log event "kick"
Reply With Quote #8

i want to ban all players who disconnect/reconnect from the server for 10 minutes (not if they are kicked and they reconnect)
jimaway is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 05-24-2011 , 06:50   Re: catch log event "kick"
Reply With Quote #9

That event doesn't work at all, not even on disconnect.

I dunno if hooking "disconnect" command triggers something, you could try it tough.

A hard alternative would be to comunicate with all plugins that kick players (meaning editing them to send signals to your plugin).

Also, for your plugin, you should consider players that reconnect due to timeout.
__________________
Hunter-Digital is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 05-24-2011 , 08:40   Re: catch log event "kick"
Reply With Quote #10

i tried hooking disconnect but it also triggers on kick, and i dont really want to edit all plugins that may kick players, thats plain annoying
maby i could hook kick in plugin_log()? im not really aware how that works
jimaway is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:04.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode