[Tutorial] Time System
#24

Quote:
Originally Posted by GAMER_PS2
View Post
Nice Tutorial AceFlyer Next time use this one

pawn Code:
public TimeU()
{
    new string[7];                            
    Tsec+=1;                                      
    if(Tsec==60) {                                
        Tsec=00;
        THrs+=1;                                  
    }
    if(THrs==24) {
        Tsec=00;
        THrs=0;
    }
    if(Tsec<10) {                                
                                                 
        format(string,sizeof(string),"%d:%d0",THrs,Tsec);
    }
    if(Tsec>10) {
                                                 
        format(string,sizeof(string),"%d:%02d",THrs,Tsec);
    }
    if(THrs<10) {
                                                 
        format(string,sizeof(string),"0%d:%02d",THrs,Tsec);
    }
    for(new i; i<MAX_PLAYERS; i++) {              
        if(IsPlayerConnected(i)) {              
            SetPlayerTime(i,THrs,Tsec);          
        }
    }
    TextDrawSetString(Time,string);
    return 1;
}
so theres 0 before the numer 1 to 9 like this

"06:01" anyway i love it! i using it on my gangwar gamemode
If people plans to copy and paste (like me xD because this is amazing), people will get a error with
pawn Code:
TextDrawSetString(Time,string);
Change it to
pawn Code:
TextDrawSetString(Servt,string);
and also nice FS
Reply


Messages In This Thread
Time System - by AceFlyer - 10.09.2011, 09:36
Re: Time System - by Lorenc_ - 10.09.2011, 09:37
Re: Time System - by AceFlyer - 10.09.2011, 09:39
Re: Time System - by Xx_OutLawZ_xX - 10.09.2011, 09:42
Re: Time System - by Darnell - 10.09.2011, 09:58
Re: Time System - by System64 - 10.09.2011, 10:50
Re: Time System - by kurta999 - 10.09.2011, 10:56
Re: Time System - by =WoR=G4M3Ov3r - 10.09.2011, 11:30
Re: Time System - by Davz*|*Criss - 10.09.2011, 12:25
Re: Time System - by Wesley221 - 10.09.2011, 13:49
Re: Time System - by AceFlyer - 10.09.2011, 14:36
Re: Time System - by Basicz - 10.09.2011, 14:46
Re: Time System - by AceFlyer - 10.09.2011, 16:02
Re: Time System - by System64 - 10.09.2011, 16:07
Re: Time System - by AceFlyer - 10.09.2011, 16:10
Re: Time System - by AceFlyer - 10.09.2011, 16:20
Re: Time System - by System64 - 10.09.2011, 16:26
Re: Time System - by System64 - 10.09.2011, 19:07
Re: Time System - by AceFlyer - 11.09.2011, 04:08
Re: Time System - by System64 - 11.09.2011, 05:26
Re: Time System - by AceFlyer - 11.09.2011, 11:23
Re: Time System - by Millionaire - 11.09.2011, 12:03
Re: Time System - by GAMER_PS2 - 30.10.2011, 11:16
Re: Time System - by Tanush123 - 21.01.2012, 20:12

Forum Jump:


Users browsing this thread: 2 Guest(s)