AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved [ H3LP ] Unix time (https://forums.alliedmods.net/showthread.php?t=307668)

CrazY. 05-20-2018 15:53

[ H3LP ] Unix time
 
Hello, I'm developing a ban system with vault/unix time. I've some doubts:

1. How I can add minutes to a unix time?

2. How I can get when systime reach a unix time/date that I given? (set_task? server_frame?)

esenrik 05-20-2018 16:15

Re: [ H3LP ] Unix time
 
Hello.

1. Unix time count is in seconds, just add seconds to the unixtime you have.
2. if (your current timestamp >= date you given) { what you want ...}

I think that is what you need

CrazY. 05-20-2018 16:20

Re: [ H3LP ] Unix time
 
1. get_systime() + (20 minutes * 60 seconds). Ok, I got it.

2. So, loop a task and check as an you've shown. Ok.

esenrik 05-20-2018 16:26

Re: [ H3LP ] Unix time
 
Quote:

Originally Posted by CrazY. (Post 2592971)
1. get_systime() + (20 minutes * 60 seconds). Ok, I got it.

2. So, loop a task and check as an you've shown. Ok.

Exactly.


All times are GMT -4. The time now is 08:48.

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