Jump to content
  • 0

script explanation pls


domez86

Question


  • Group:  Members
  • Topic Count:  85
  • Topics Per Day:  0.02
  • Content Count:  207
  • Reputation:   0
  • Joined:  06/11/13
  • Last Seen:  

hi I would like to understand from this script what the value "21" has before the word LASTENTERTIME, and why in the table db mysql I get such a high value:

150035 LASTENTERTIME 0 1572792886
1572792886?

mes "Is possible to enter once a day.";
        if (select("Yes!","No thanks.") == 2) close;
        if(LASTENTERTIME > gettimetick(2)){
        mes "You can enter once every 24h!";
        mes "Come back after " + gettimestr("%H:%M:%S",21,LASTENTERTIME);
        mes "of the " + gettimestr("%d/%m/%Y",21,LASTENTERTIME);
        end;
}
    LASTENTERTIME = gettimetick(2) + (60*60*24);
    warp "xxxxx",xxx,xxx;
    end;
}

tnx!

Edited by domez86
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  116
  • Reputation:   18
  • Joined:  09/08/17
  • Last Seen:  

*gettimetick(<tick type>)

This function will return a tick depending on <tick type>:
 0: The server's tick, a measurement in milliseconds used by the server's timer
    system. This tick is an unsigned int which loops every ~50 days.
 1: The time, in seconds, since the start of the current day.
 2: The system time in UNIX epoch time, or the number of seconds elapsed since
    January 1st, 1970. Useful for reliably measuring time intervals.

 

  • Upvote 1
Link to comment
Share on other sites

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.

×
×
  • Create New...