02.10.2011, 07:10
Код:
// Time Game mode init: Tsec= 0; THrs= 0; SetTimer("TimeU",1000,true); return 1; } forward TimeU(); public TimeU() { new string[128]; 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:%d",THrs,Tsec); } if(THrs<10) { format(string,sizeof(string),"0%d:%d",THrs,Tsec); } for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { SetPlayerTime(i,THrs,Tsec); Servt=TextDrawCreate(545, 31, "00:00"); TextDrawColor(Servt, COLOR_WHITE); } }