Thread: Time check
View Single Post
jugule
AlliedModders Donor
Join Date: Apr 2020
Old 02-06-2021 , 06:08   Re: Time check
Reply With Quote #3

Quote:
Originally Posted by FAQU View Post
PHP Code:
public void OnPluginStart()
{
    
CreateTimer(60.0Timer_Checktime_TIMER_REPEAT);
}

public 
Action Timer_Checktime(Handle timer)
{
    
char time[32];
    
int timestamp GetTime();
    
    
FormatTime(timesizeof(time), "%H:%M"timestamp);
    
    if (
StrEqual(time"17:30"))
    {
        
// do stuff
    
}

Not working.

PHP Code:
public Action Timer_Checktime(Handle timer)
{
    
char time[32];
    
int timestamp GetTime();
    
    
FormatTime(timesizeof(time), "%H:%M"timestamp);
    
    for (
int i 1<= MaxClientsi++)  
    {  
        if (
IsClientInGame(i))  
        {   
            if(
StrEqual(time"00:00"))
            {
                
SetHudTextParams(-1.00.35.0741693425500.10.10.1);
                
ShowHudText(i5"Clock: 00:00");     
            }
        }
    }


Last edited by jugule; 02-06-2021 at 06:10.
jugule is offline