AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [help] Time set for public function (https://forums.alliedmods.net/showthread.php?t=254770)

indraraj striker 01-06-2015 09:03

[help] Time set for public function
 
How to set time for enable some function
Ty in advanced
PHP Code:

public Morningtime(id)//6 am 
{
if(
how to set time)
it will excute on Morning
}

public 
Afternoontime(id)//12 pm
{
if(
how to set time)
it will excute on afternoon
}

public 
Nighttime(id)//7 pm
{
if(
how to set time)
it will excute on night time



fysiks 01-06-2015 19:01

Re: [help] Time set for public function
 
Get the current time and compare to the target time. The time() function will get you the hour, minute, and second of the day.

indraraj striker 01-07-2015 00:35

Re: [help] Time set for public function
 
Quote:

Originally Posted by fysiks (Post 2245796)
Get the current time and compare to the target time. The time() function will get you the hour, minute, and second of the day.

thank you got it :)

Kuma77 01-07-2015 15:02

Re: [help] Time set for public function
 
Quote:

Originally Posted by fysiks (Post 2245796)
Get the current time and compare to the target time. The time() function will get you the hour, minute, and second of the day.

Nice idea , Thx


All times are GMT -4. The time now is 15:31.

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