Raised This Month: $240 Target: $400
 60% 

Player disconnect voluntarily or not


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LithuanianJack
Senior Member
Join Date: Nov 2013
Location: Vilnius, Lithuania
Old 11-22-2017 , 10:17   Player disconnect voluntarily or not
Reply With Quote #1

Hi. Is it possible to print on the server when player left the game by choice or not by his own desire? How?

For example prints now

PHP Code:
public client_disconnected(id)
{
            
client_print(0"Player %s has left the server"player_id)

I need

PHP Code:
public client_disconnected(id)
{
    
// if player have left the server by choice
            
client_print(0"Player %s has left the server (by choice)"player_id)
            
    
// if player have left the server by internet connection lost or other causes
            
client_print(0"Player %s has left the server (connection lost)"player_id)

LithuanianJack is offline
TheWhitesmith
Senior Member
Join Date: Oct 2017
Location: Morocco :c
Old 11-22-2017 , 10:37   Re: Player disconnect voluntarily or not
Reply With Quote #2

I think in some cases you can, because players know why a client disconnected (client sent drop, client timed out, etc) but I dont know how.
Edit: with the latest version of amxmodx you can do it using "client_disconnected", here is what you should know
PHP Code:
 * @param id         Client index
 
* @param drop       If truethe game has explicitly dropped the client
 
* @param message    If drop is truea writable buffer containing the disconnect info message
 
* @param maxlen     Maximum size of buffer 

Last edited by TheWhitesmith; 11-22-2017 at 10:41.
TheWhitesmith is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 11-22-2017 , 10:45   Re: Player disconnect voluntarily or not
Reply With Quote #3

Check Bugsy's plugin.
__________________

Last edited by edon1337; 11-22-2017 at 10:46.
edon1337 is offline
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 11-22-2017 , 11:17   Re: Player disconnect voluntarily or not
Reply With Quote #4

https://forums.alliedmods.net/showthread.php?t=166239
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
LithuanianJack
Senior Member
Join Date: Nov 2013
Location: Vilnius, Lithuania
Old 11-23-2017 , 05:26   Re: Player disconnect voluntarily or not
Reply With Quote #5

Quote:
Originally Posted by D3XT3R View Post
Quote:
Originally Posted by edon1337 View Post
Check Bugsy's plugin.
Thanks. I will use this plugin. But there is also a problem. https://forums.alliedmods.net/showpo...0&postcount=84
LithuanianJack is offline
Reply


Thread Tools
Display Modes

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 12:27.


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