help with textdraw
#2

Add this on top of the script:
PHP код:
new Tsec;
new 
THrs
OnGameModeInit
PHP код:
Tsec0;
    
THrs12;
    
SetTimer("TimeU",60000,true); 
Add this anywhere on your script:
PHP код:
forward TimeU();
public 
TimeU()
{
    new 
string[7];
    
Tsec+=1;
    if(
Tsec==60)
    {
        
Tsec=0;
        
THrs+=1;
    }
    if(
THrs==24)
    {
        
Tsec=0;
        
THrs=0;
    }
    if(
THrs>9)
    {
        if(
Tsec<10)
        {
            
format(string,sizeof(string),"%d:0%d",THrs,Tsec);
        }
        if(
Tsec>9)
        {
               
format(string,sizeof(string),"%d:%d",THrs,Tsec);
        }
    }
    if(
THrs<10)
    {
        if(
Tsec<10)
        {
            
format(string,sizeof(string),"0%d:0%d",THrs,Tsec);
        }
        if(
Tsec>9)
        {
               
format(string,sizeof(string),"0%d:%d",THrs,Tsec);
        }
    }
    for(new 
ii<MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i))
        {
            
SetPlayerTime(i,THrs,Tsec);
        }
    }
    
SetWorldTime(THrs);
    
TextDrawSetString(Textdraw3,string);

Reply


Messages In This Thread
help with textdraw - by Karolukas123 - 03.02.2015, 02:34
Re: help with textdraw - by ATGOggy - 03.02.2015, 04:05
Re: help with textdraw - by Karolukas123 - 03.02.2015, 04:08
Re: help with textdraw - by ATGOggy - 03.02.2015, 04:11
Re: help with textdraw - by Karolukas123 - 03.02.2015, 04:14
Re: help with textdraw - by ATGOggy - 03.02.2015, 04:15
Re: help with textdraw - by HY - 03.02.2015, 07:31

Forum Jump:


Users browsing this thread: 1 Guest(s)