13.01.2009, 16:50
Nice, but it looks very similar to the default sa-mp clock.
Anyway, i have a tip for you regarding this piece of code:
You can replace that whole code with:
That '%02d' will give that value automatically 2 numbers.
Код:
TogglePlayerClock(playerid, 1);
Код:
if(Hour<9 && Minute<9){format(String,sizeof(String),"0%d:0%d",Hour,Minute);} else if(Hour>9 && Minute<9){format(String,sizeof(String),"%d:0%d",Hour,Minute);} else if(Hour<9 && Minute>9){format(String,sizeof(String),"0%d:%d",Hour,Minute);} else{format(String,sizeof(String),"%d:%d",Hour,Minute);}
Код:
format(String, sizeof(String), "%02d:%02d", Hour, Minute);