SA-MP Forums Archive
Timer Question - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Timer Question (/showthread.php?tid=441664)



Timer Question - Blackazur - 03.06.2013

Hello, i would ask if there is anything wrong with this code, will it working?

Код:
TimeConvert(time)
{
    new minutes;
    new seconds;
    new string[128];
    if(time > 59){
        minutes = floatround(time/60);
        seconds = floatround(time - minutes*60);
        if(seconds>9)format(string,sizeof(string),"%d:%d",minutes,seconds);
        else format(string,sizeof(string),"%d:0%d",minutes,seconds);
    }
    else{
        seconds = floatround(time);
        if(seconds>9)format(string,sizeof(string),"0:%d",seconds);
        else format(string,sizeof(string),"0:0%d",seconds);
    }
    return string;
}



Re: Timer Question - Scenario - 03.06.2013

Have you tested it..?


AW: Timer Question - Blackazur - 03.06.2013

Yep but when i use this cmd:

Код:
CMD:skip(playerid)
{
	if(pInfo[playerid][pLogged] == 1)
	{
		if(pInfo[playerid][pAdminLevel] >= 5)
		{
			maptime = 5; 
		}
	}
	return 1;
}
maptime = 5; is the important thing
The timer duplicate with 2 seconds and not more 1 and it load very fast, and the maps load very fast and you cant play, and i dont have any solution for that. Can you help me please?