Raised This Month: $ Target: $400
 0% 

Client drop


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 11-14-2011 , 16:08   Client drop
Reply With Quote #1

Hey guys

Is there any forward public or register that is called when client drops (out of the game, not logging off, but drops. and please dont give me client_disconnect, cuz i want to know when a client has dropped)?
__________________
My Projects:

Auto-Mix (Pug): 100%

Joined the Military (a soldier now) - Inactive

Last edited by Diegorkable; 11-14-2011 at 16:09.
Diegorkable is offline
Dark Style
BANNED
Join Date: Feb 2011
Location: Brazil
Old 11-14-2011 , 17:02   Re: Client drop
Reply With Quote #2

Code:
public plugin_init() register_clcmd("drop", "clcmd_drop")
public drop(id)
{
}
?
Dark Style is offline
Stereo
Veteran Member
Join Date: Dec 2010
Old 11-14-2011 , 17:03   Re: Client drop
Reply With Quote #3

PHP Code:
register_forward(FM_ClientDisconnect"fw_ClientDisconnect")
register_forward(FM_ClientDisconnect"fw_ClientDisconnect_Post"1
Stereo is offline
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 11-14-2011 , 18:09   Re: Client drop
Reply With Quote #4

Quote:
Originally Posted by Dark Style View Post
Code:
public plugin_init() register_clcmd("drop", "clcmd_drop")
public drop(id)
{
}
?
lol you gotta be kidding me
read the thread again, please.


Quote:
Originally Posted by Stereo View Post
PHP Code:
register_forward(FM_ClientDisconnect"fw_ClientDisconnect")
register_forward(FM_ClientDisconnect"fw_ClientDisconnect_Post"1
Isn't it being called only when a player simply disconnects, but doesnt drop?
__________________
My Projects:

Auto-Mix (Pug): 100%

Joined the Military (a soldier now) - Inactive

Last edited by Diegorkable; 11-14-2011 at 18:12.
Diegorkable is offline
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 11-15-2011 , 11:09   Re: Client drop
Reply With Quote #5

Quote:
Originally Posted by Diegorkable View Post
Isn't it being called only when a player simply disconnects, but doesnt drop?
Isn't drop and disconnect exactly the same?, when you disconnect you send the command drop
Erox902 is offline
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 11-15-2011 , 13:37   Re: Client drop
Reply With Quote #6

Not really.

Disconnecting is when you want to stop playing in the server for some reason and then you just double click on another server to connect to it then you disconnect the current server you are in, and when you get kicked because of an error, or a good example for a drop would be that if you connect to a server and the cvar sv_allowdownload is 0, then you get kicked out of the game with a message saying "cannot continue without model..." and for everyone in console it says "p1Mp dropped" *and a line below it* "p1Mp has left the game", when the player just leaves it doesnt say he dropped. is there anyway to detect for example when is client getting kicked out of the server when sv_allowdownload is 0? (considering there are few which it works for, and for some it doesnt, so dont tell me to check if cvar is 0 then do something to whoever client_disconnect's)

hope you understood
__________________
My Projects:

Auto-Mix (Pug): 100%

Joined the Military (a soldier now) - Inactive
Diegorkable is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-15-2011 , 17:24   Re: Client drop
Reply With Quote #7

If it shows in the log then you can register a log event.
__________________
fysiks is offline
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 11-16-2011 , 04:32   Re: Client drop
Reply With Quote #8

When a player drops it shows in the logs "PLAYER_NAME dropped", how can I register that and get the player ID as a parameter?

Would that be good?:

PHP Code:
register_logevent("player_drop"2"1=dropped"
but if 1st arg is the player name, then how do I get his id? by getting his name then cmd_target?
__________________
My Projects:

Auto-Mix (Pug): 100%

Joined the Military (a soldier now) - Inactive

Last edited by Diegorkable; 11-16-2011 at 05:12.
Diegorkable is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-16-2011 , 08:08   Re: Client drop
Reply With Quote #9

If all else fails, try this. You can determine if client sent 'drop', was kicked, or timed out..there may be other reasons too but I haven't experimented too much.
__________________

Last edited by Bugsy; 11-16-2011 at 08:09.
Bugsy is offline
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 11-16-2011 , 09:03   Re: Client drop
Reply With Quote #10

Looks good, I'll take a look. But do I use register_logevent correct to detect a drop?
__________________
My Projects:

Auto-Mix (Pug): 100%

Joined the Military (a soldier now) - Inactive
Diegorkable 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 03:32.


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