Quote:
Originally Posted by Xalus
For somereason this doesn't work..
PHP Code:
new const g_iBanTime[8] = {
300,
3600,
360,
1440,
360,
604800,
604800,
0
};
new Secs, Mins, Hours;
Secs = g_iBanTime[i];
convert_seconds( Secs, Mins, Hours );
formatex(szTime, charsmax(szTime), "\d(%ih %imins %is)", Hours, Mins, Secs);
stock convert_seconds( &seconds, &minutes, &hours ) {
hours = seconds / 3600
minutes = (hours % 3600) / 60
seconds %= 60
}
|
That's because you didn't do what I showed. The
hours variable should never be used, only assigned. See my example again.
Quote:
Originally Posted by SpeeDeeR
There is already a native for that ? Inspect time.inc
|
1. There are not natives in time.inc
2. The stock converts to a string.
__________________