Help! How to change the timer format?
#9

Quote:
Originally Posted by Rodri99
Посмотреть сообщение
He doesn't want to make a timer, he wants to display on the string the time on minutes and not in milliseconds.
Quote:
Originally Posted by xVIP3Rx
Посмотреть сообщение
EDIT: after rereading I understood you wanna change the format itself, not the timer so I apologize and here you go.
pawn Код:
#define MAX_MAPTIME 250
#define MAX_MAPUPDATE_TIME 1450

function OnMapUpdate(playerid)
{
    time -= 1;

    TextDrawSetString(TimeLeft,whatevername(time));//this will change

    if(time <= 0) TextDrawSetString(TimeLeft," ..."),KillTimer(mapvar),KillTimer(balvar),SetTimer("ShowCheckpoint",MAX_SHOW_CP_TIME,false);
    if(time <= 0) GameTextForPlayer(playerid,"~b~Humans~n~ ~w~Go To Evacuation!",5000,6);//
    return 1;
}

whatevername(seconds)
{
    new vstr[8], minutes = floatround(seconds / 60, floatround_floor);
    format(vstr, sizeof(vstr), "%02d:%02d", minutes, seconds - (minutes * 60));
    return vstr;
}
Also, your code is no way near right, please be sure of what you're posting and if you could even test it would be better, cause you're making the problem worse for scripters
Reply


Messages In This Thread
SOLVED - by Ercha - 31.08.2015, 13:03
Re: Help! How to change the timer format? - by Rodri99 - 31.08.2015, 13:15
Re: Help! How to change the timer format? - by Ercha - 31.08.2015, 13:25
Re: Help! How to change the timer format? - by Rodri99 - 31.08.2015, 13:27
Re: Help! How to change the timer format? - by Ercha - 31.08.2015, 13:30
Re: Help! How to change the timer format? - by xVIP3Rx - 31.08.2015, 13:31
Re: Help! How to change the timer format? - by Rodri99 - 31.08.2015, 13:31
Re: Help! How to change the timer format? - by Rodri99 - 31.08.2015, 13:49
Re: Help! How to change the timer format? - by xVIP3Rx - 31.08.2015, 14:04
Re: Help! How to change the timer format? - by Ercha - 31.08.2015, 21:12

Forum Jump:


Users browsing this thread: 1 Guest(s)