AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   AMX Bans How to calculate date of create and end? (https://forums.alliedmods.net/showthread.php?t=308356)

gameplayonline 06-17-2018 14:58

AMX Bans How to calculate date of create and end?
 
Hello,
Im doing script to connect SMS gate VIP with my amxbans...
Im interested how is calculated date of create/date of end because this script will manually add user to admin database with VIP flags...
I need know this to complete end my script. Thank you.

I mean this in mysql database i have:
created: 1529232301 expired: 1531824301 days: 30

1531824301 - 1529232301 / 60 / 60 = 24 hours ok it looks its in seconds but how to get first variable created :?:

maqi 06-17-2018 15:00

Re: AMX Bans How to calculate date of create and end?
 
To get a timestamp use
Code:
 get_systime()

gameplayonline 06-17-2018 15:35

Re: AMX Bans How to calculate date of create and end?
 
Is it php function? Because i cant use/find it on php net. This script is in PHP... It is without game server control.

maqi 06-17-2018 15:45

Re: AMX Bans How to calculate date of create and end?
 
No its an amxx native, for php its
Code:
time()

gameplayonline 06-18-2018 05:13

Re: AMX Bans How to calculate date of create and end?
 
thanks


All times are GMT -4. The time now is 12:16.

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