Raised This Month: $ Target: $400
 0% 

Problem: get_user_time at mapchange


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fragnichtnach
AlliedModders Donor
Join Date: Oct 2008
Old 10-27-2009 , 18:03   Problem: get_user_time at mapchange
Reply With Quote #1

I am searching for a methode to get the connection time HLSW for example shows.
get_user_time just returns the connection time while the plugin is running.

So if mp_timelimit is 30, get_user_time return at maximum 30*60.
But there are players shown at HLSW and the "View server info" with a connection time over an hour for example.

How do I get this time for a specific player?

Thanks for help and reading?
fragnichtnach is offline
lazarev
Veteran Member
Join Date: Sep 2008
Old 10-28-2009 , 03:23   Re: Problem: get_user_time at mapchange
Reply With Quote #2

Quote:
Thanks for help and reading?
yes.
lazarev is offline
fragnichtnach
AlliedModders Donor
Join Date: Oct 2008
Old 10-28-2009 , 09:39   Re: Problem: get_user_time at mapchange
Reply With Quote #3

Sorry, shouldn't be a question...

Thanks for help and reading!
fragnichtnach is offline
fragnichtnach
AlliedModders Donor
Join Date: Oct 2008
Old 10-29-2009 , 04:40   Re: Problem: get_user_time at mapchange
Reply With Quote #4

Nobody answers... Seems like it is not possible with amxmodx.
fragnichtnach is offline
Xellath
Veteran Member
Join Date: Dec 2007
Location: Sweden
Old 10-29-2009 , 04:52   Re: Problem: get_user_time at mapchange
Reply With Quote #5

You could get the current time and save it in nvault just before map change and then check for the users steamid/ip and just continue the counting. If the user disconnects before the map change, you should check on the next map whether the user is still connected; if he's not, then remove the entry.

Other than that, I highly doubt it's possible(with a native).

You may also test storing it in an array, using this module. It can store the array through map changes.
__________________
Achievements API - a simple way for you to create your OWN custom achievements!

Last edited by Xellath; 10-30-2009 at 12:38. Reason: typos
Xellath is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-29-2009 , 10:53   Re: Problem: get_user_time at mapchange
Reply With Quote #6

Quote:
Originally Posted by Xellath View Post
It can store the array through map changes.
Fixed.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 10-29-2009 , 16:28   Re: Problem: get_user_time at mapchange
Reply With Quote #7

You dont need Array Solutions for that, tries and arrays saves dates trough map changes too, afaik
__________________
xPaw is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 10-30-2009 , 09:50   Re: Problem: get_user_time at mapchange
Reply With Quote #8

Quote:
Originally Posted by xPaw View Post
You dont need Array Solutions for that, tries and arrays saves dates trough map changes too, afaik
uhm u sure? so why doesn't Exolent use it in his ban plugin then?
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.
Owyn is offline
Send a message via ICQ to Owyn
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-30-2009 , 15:06   Re: Problem: get_user_time at mapchange
Reply With Quote #9

Because I didn't want to save them over map change.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 10-30-2009 , 15:12   Re: Problem: get_user_time at mapchange
Reply With Quote #10

Quote:
Originally Posted by Exolent[jNr] View Post
Because I didn't want to save them over map change.
why?
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.
Owyn is offline
Send a message via ICQ to Owyn
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 17:33.


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