Raised This Month: $32 Target: $400
 8% 

Disconnect Reason


Post New Thread Reply   
 
Thread Tools Display Modes
freak716
Junior Member
Join Date: Sep 2015
Old 05-30-2017 , 04:19   Re: Disconnect Reason
Reply With Quote #81

Hi @Bugsy,

Is this plugin still working?
There is a way to change the message or reason "Reason: Kicked" in CS windows when a player was kicked because mp_autokick is set to 1 and you were AFK
__________________
Signature should be here. I don't know what to say
freak716 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 06-01-2017 , 22:28   Re: Disconnect Reason
Reply With Quote #82

Quote:
Originally Posted by freak716 View Post
Hi @Bugsy,

Is this plugin still working?
There is a way to change the message or reason "Reason: Kicked" in CS windows when a player was kicked because mp_autokick is set to 1 and you were AFK
Does it still work? I don't know, but I assume so.

This plugin only detects the disconnect type at a basic level--a kick is a kick, the fact that a kick occurred because of X reason does not change the fact that it is still just a kick. You would need to create a plugin with it's own AFK/autokick-checking logic to handle this. If you can detect that the person has been AFK for the duration that would exceed autokick threshhold then you can handle the scenario in the forward.
PHP Code:
public client_disconnect_reasonid ReasonCodes:drReason , const szReason[] )
{
    if ( 
drReason == DR_KICKED && bIsAFKForAutoKickDuration )
         
//Kicked because of autokick/AFK

__________________

Last edited by Bugsy; 06-01-2017 at 22:36.
Bugsy is offline
freak716
Junior Member
Join Date: Sep 2015
Old 06-02-2017 , 09:32   Re: Disconnect Reason
Reply With Quote #83

Good I will try the plugin and I will let you know thanks!
__________________
Signature should be here. I don't know what to say
freak716 is offline
LithuanianJack
Senior Member
Join Date: Nov 2013
Location: Vilnius, Lithuania
Old 11-23-2017 , 05:24   Re: Disconnect Reason
Reply With Quote #84

Hi. I change these reasons, but nothing changes. These reasons persists. What's wrong?

PHP Code:
new const DisconnectMessagesReasonCodes ][] = 
{
    
"Timed out"
    
"Client sent 'drop'",
    
"Kicked",
    
"Dropping fakeclient on level change",
    
""
}; 
-->>>
PHP Code:
new const DisconnectMessagesReasonCodes ][] = 
{
    
"vremya vyshlo"
    
"otklyuchen dobrovolno",
    
"nogami",
    
"izmeneniye karty",
    
"drugiye"
}; 

Last edited by LithuanianJack; 11-23-2017 at 05:29.
LithuanianJack is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 11-23-2017 , 07:10   Re: Disconnect Reason
Reply With Quote #85

Nobody said you can change them. They're not used to be shown somewhere, but to detect the disconnect reason. You just broke the code by changing them.
__________________

Last edited by OciXCrom; 11-23-2017 at 07:11.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
LithuanianJack
Senior Member
Join Date: Nov 2013
Location: Vilnius, Lithuania
Old 11-23-2017 , 07:16   Re: Disconnect Reason
Reply With Quote #86

Quote:
Originally Posted by OciXCrom View Post
Nobody said you can change them. They're not used to be shown somewhere, but to detect the disconnect reason. You just broke the code by changing them.
When player kicked, the reasons are shown in this line:

PHP Code:
    formatexszMessage charsmaxszMessage ) , "^1*^3 %s ^1has disconnected - Reason [^4 %s ^1]" g_szNameiDisconnectID ] , g_DisconnectInfoReasonMessage ] ); 
I want to change the displayed reasons to my own language
LithuanianJack is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 11-23-2017 , 07:49   Re: Disconnect Reason
Reply With Quote #87

Then display a message based on the disconnect code that you get. There's even an example that does exactly that in the original post.
klippy is offline
TheWhitesmith
Senior Member
Join Date: Oct 2017
Location: Morocco :c
Old 11-23-2017 , 12:38   Re: Disconnect Reason
Reply With Quote #88

Quote:
Originally Posted by LithuanianJack View Post
When player kicked, the reasons are shown in this line:

PHP Code:
    formatexszMessage charsmaxszMessage ) , "^1*^3 %s ^1has disconnected - Reason [^4 %s ^1]" g_szNameiDisconnectID ] , g_DisconnectInfoReasonMessage ] ); 
I want to change the displayed reasons to my own language
PHP Code:
g_DisconnectInfoReasonMessage 
not
PHP Code:
DisconnectMessagesReasonCodes 
TheWhitesmith is offline
LithuanianJack
Senior Member
Join Date: Nov 2013
Location: Vilnius, Lithuania
Old 11-23-2017 , 13:08   Re: Disconnect Reason
Reply With Quote #89

Quote:
Originally Posted by TheWhitesmith View Post
PHP Code:
g_DisconnectInfoReasonMessage 
not
PHP Code:
DisconnectMessagesReasonCodes 
I used it. Read again my line:

PHP Code:
    formatexszMessage charsmaxszMessage ) , "^1*^3 %s ^1has disconnected - Reason [^4 %s ^1]" g_szNameiDisconnectID ] , g_DisconnectInfoReasonMessage ] ); 
Or I did not understand you, correct me please.
LithuanianJack is offline
LithuanianJack
Senior Member
Join Date: Nov 2013
Location: Vilnius, Lithuania
Old 01-08-2020 , 06:27   Re: Disconnect Reason
Reply With Quote #90

How can I do that only admins (ADMIN_BAN) would be notified about player's disconnect?
LithuanianJack 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 19:46.


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