Jump to content
  • 0

Question

Posted

I would like to make that when the player leaves the game, time stops counting, and when it returns, the time goes back to where it stopped. For example, if the point is received every 1 hour, if the player leaves after 20 minutes, when he enters again, the time continues at 20 minutes, this way the player does not waste time if he needs to change char or disconnected .

Is it possible?

  Reveal hidden contents

1 answer to this question

Recommended Posts

  • 0
Posted

I don't have my scripting command reference on me via mobile... But... OnPCLogoutEvent:

Get value of timer... And play it in a perm char var... Then OnPCLoginEvent: first check for the existence of the perm char var... And if it exists... Addtimer... For .s_time - permcl char var... Else not exist... .s_time

 

Also you will need to make sure to clear that perm char var on hourly pickup, or whenever else in the script the timer is reset or added... But it should work just fine

  • Upvote 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...