The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regarding Time Online
Author Message
Rattlehead
Master
**

Posts: 290
Likes Given: 3
Likes Received: 8 in 6 posts
Joined: Jun 2012
Reputation: 8



Post: #21
RE: Regarding Time Online
well, it seemed to me, he only wanted to know if they were in game for a full hour at a time, if they were on for 15 minutes, logged off, then their hour was to start over, not continue on until they have reached an hour, so i was under the assumption, they log off, time starts over.

and since the timers running on each player is also very light-weight, even more so than yours is, then i cant grasp how you are conceiving that a heavier timer running globally and firing on each character every few minutes could be less resource consuming at all.

honestly i dont like either idea very much, i would rather find a way a trigger could fire the function to add to the tag then do away with timers all together, but i cant come up with one that would be reliable enuff so that players wont log off thinking they were on for an hour, and nvr tripped the trigger to add to the tag.

[Image: matts_siggy.gif]
08-15-2013 08:30 AM
Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #22
RE: Regarding Time Online
I'd go with the f_onserver_timer set the interval to 1 minute to write to ctags on online players.
Yes it's a little heavier, but I often have f_onserver_timer set to that for other stuff anyway, and honestly how many players do you have online at once on a server nowadays anyway?

[Image: 2nis46r.jpg]
08-15-2013 09:07 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Rattlehead
Master
**

Posts: 290
Likes Given: 3
Likes Received: 8 in 6 posts
Joined: Jun 2012
Reputation: 8



Post: #23
RE: Regarding Time Online
ON=@Logout
src.f_hoursonline

[function f_hoursonline]
src.TAG.OnlineHours += <eval <ACCOUNT.LASTCONNECTTIME>/60> // per courja Wink
return <eval <src.tag.OnlineHours>>

assuming this works of course, the function will return their total connected hours when called right?
he could then use this in his calls in his scripts @logoff or whatnot, no need for timers, totally pretty much corjas first idea Tongue

[Image: matts_siggy.gif]
08-15-2013 12:40 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 6 Guest(s)