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

get_user_time is not supported in client_disconnected?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OnePL
BANNED
Join Date: May 2012
Location: GB
Old 04-24-2017 , 10:26   get_user_time is not supported in client_disconnected?
Reply With Quote #1

get_user_time is not supported in client_disconnected in AMXX 1.8.3?
Always returns 0
OnePL is offline
Send a message via ICQ to OnePL Send a message via AIM to OnePL Send a message via Yahoo to OnePL Send a message via Skype™ to OnePL
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 04-24-2017 , 11:40   Re: get_user_time is not supported in client_disconnected?
Reply With Quote #2

It returns the player's time after his connection on server (client_putinserver)
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
OnePL
BANNED
Join Date: May 2012
Location: GB
Old 04-24-2017 , 12:54   Re: get_user_time is not supported in client_disconnected?
Reply With Quote #3

That's right, but why does it return 0 before disconnecting?
OnePL is offline
Send a message via ICQ to OnePL Send a message via AIM to OnePL Send a message via Yahoo to OnePL Send a message via Skype™ to OnePL
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 04-24-2017 , 13:10   Re: get_user_time is not supported in client_disconnected?
Reply With Quote #4

You mean when the player is in server and get_user_time() is returning 0? I don't know why, show us the code that you're using.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 04-24-2017 , 17:19   Re: get_user_time is not supported in client_disconnected?
Reply With Quote #5

Quote:
Originally Posted by OnePL View Post
That's right, but why does it return 0 before disconnecting?
How do you know he returns 0 BEFORE disconnecting ? Do you mean at the middle of the game not before disconnecting.

Anyway, show us your code.
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
OnePL
BANNED
Join Date: May 2012
Location: GB
Old 04-25-2017 , 08:48   Re: get_user_time is not supported in client_disconnected?
Reply With Quote #6

PHP Code:
#include <amxmodx>

public client_disconnected(id) {
    new 
szName[32];
    
get_user_name(idszName31);
    
log_to_file("test.log""player (%i) %s (time %i) disconnected"idszNameget_user_time(id));

OnePL is offline
Send a message via ICQ to OnePL Send a message via AIM to OnePL Send a message via Yahoo to OnePL Send a message via Skype™ to OnePL
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 04-25-2017 , 16:56   Re: get_user_time is not supported in client_disconnected?
Reply With Quote #7

The problem is not get_user_time() , after the user is disconnecting there are no more that id existing, to understand better try to test this code:

Code:
#include <amxmodx> public client_disconnect( id ) {     server_print( "ID: %i" , id );    }


Output:

Quote:
Client with that name or userid not found
__________________
Project: Among Us

Last edited by Craxor; 04-25-2017 at 16:57.
Craxor is offline
Send a message via ICQ to Craxor
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-25-2017 , 20:04   Re: get_user_time is not supported in client_disconnected?
Reply With Quote #8

Quote:
Originally Posted by Craxor View Post
The problem is not get_user_time() , after the user is disconnecting there are no more that id existing, to understand better try to test this code:

Code:
#include <amxmodx> public client_disconnect( id ) {     server_print( "ID: %i" , id );    }


Output:
Quote:
Client with that name or userid not found
That code does not produce that output. The code will output the id properly but that's not a valid check for anything.
__________________
fysiks is offline
PartialCloning
Senior Member
Join Date: Dec 2015
Old 04-25-2017 , 20:11   Re: get_user_time is not supported in client_disconnected?
Reply With Quote #9

What dev build are you using? It works for me.
PartialCloning is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 04-26-2017 , 05:10   Re: get_user_time is not supported in client_disconnected?
Reply With Quote #10

1.8.1
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
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 02:38.


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