08.04.2010, 14:10
pawn Code:
stock GetTimeEx(&Hour, &Minute, &Second)
{
gettime(Hour, Minute, Second);
new s[3], m[3];
format(s, sizeof(s), "%d", Second);
format(m, sizeof(m), "%d", Minute);
if(strlen(s) == 1)
{
new Second2[3];
format(Second2, sizeof(Second2), "0%d", Second);
Second = strval(Second2);
}
if(!strlen(s))
{
new Second2[3];
format(Second2, sizeof(Second2), "00");
Second = strval(Second2);
}
if(strlen(m) == 1)
{
new Minute2[3];
format(Minute2, sizeof(Minute2), "0%d", Minute);
Minute = strval(Minute2);
}
if(!strlen(m))
{
new Minute2[3];
format(Minute2, sizeof(Minute2), "00", Minute);
Minute = strval(Minute2);
}
}