23.05.2011, 10:37
how about like this
pawn Код:
public IncreaseTime(playerid)
{
new h, m;
new string[20];
GetPlayerTimeEx(playerid, h, m);
TextDrawShowForPlayer(playerid, time);
m++;
if(m == 60)
{
h++;
m = 0;
}
if(h == 24)
{
h = 0;
}
SetPlayerTimeEx(playerid, h, m);
if(m >= 0&&m < 60)
{
format(string, sizeof(string), "%d:%2d", h, m);
TextDrawSetString(time,string);
}
if(m == 0){
format(string, sizeof(string), "[GAME TIME] %d:00", h);
SendClientMessage(playerid,COLOR_WHITE, string);
SetWorldTime(h);
}
return h;
}