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

Disconnect Reason


Post New Thread Reply   
 
Thread Tools Display Modes
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 06-02-2021 , 14:13   Re: Disconnect Reason
Reply With Quote #121

You don't need the plugin, the disconnect reason functionality is now baked into AMX-X, as mentioned in my prior post. Search for client_disconnected for examples on how to use it, or use this for reference http://www.amxmodx.org/api/amxmodx/client_disconnected
__________________

Last edited by Bugsy; 06-02-2021 at 14:16.
Bugsy is offline
artesian
Junior Member
Join Date: May 2021
Old 06-02-2021 , 21:08   Re: Disconnect Reason
Reply With Quote #122

Quote:
Originally Posted by Bugsy View Post
You don't need the plugin, the disconnect reason functionality is now baked into AMX-X, as mentioned in my prior post. Search for client_disconnected for examples on how to use it, or use this for reference http://www.amxmodx.org/api/amxmodx/client_disconnected
Thanks for the advice, I needed a very simple plugin that would notify the server in the chat that the player connected and disconnected, nothing else, I found this plugin: https://forums.alliedmods.net/showpo...70&postcount=3

The reasons for disabling are certainly not as detailed as yours, but it performs the main task.
artesian is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 06-02-2021 , 23:15   Re: Disconnect Reason
Reply With Quote #123

Ok, you can do what you want so easily that you could probably write it yourself.

This plugin determines specifically why the player left (kicked, timed out, left by choice)
__________________
Bugsy is offline
artesian
Junior Member
Join Date: May 2021
Old 06-03-2021 , 16:03   Re: Disconnect Reason
Reply With Quote #124

the new function you talked about client_disconnected also passes this information? (the reason why the player left)
Is it possible to use your plugin without orpheu with the new client_disconnected on amx 1.9 and get the same extended disconnect reasons?
p.s. sorry if it's offtopic or flood ...
artesian is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 06-03-2021 , 22:18   Re: Disconnect Reason
Reply With Quote #125

Quote:
Originally Posted by artesian View Post
the new function you talked about client_disconnected also passes this information? (the reason why the player left)
Is it possible to use your plugin without orpheu with the new client_disconnected on amx 1.9 and get the same extended disconnect reasons?
p.s. sorry if it's offtopic or flood ...
Here's samples, you would use a strfind() on the message value, looking for 'Kicked', etc.

Code:
Player123 disconnected - drop=Yes - message=[Kicked]
Player456 disconnected - drop=Yes - message=[Client sent 'drop']
Player789 disconnected - drop=Yes - message=[Timed out]
The code
PHP Code:
public client_disconnectedid bool:bDrop szMessage[] , iMaxLen)
{
    new 
szName32 ];
    
    
get_user_nameid szName charsmaxszName ) );
    
    
server_print"%s disconnected - drop=%s - message=[%s]" szName bDrop "Yes" "No" szMessage );

I think this discussion is ok here as client_disconnected() is a native alternative to using this plugin, with no need to bother with orpheu. I'm going to add something to the main post.
__________________
Bugsy 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:11.


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