yrace0.4 Time problem!!
#1

Hi, i have a problem with the y race script.
The displayed showed to the player when a race end is uncorrect.

When the script say the race time it says x : x .xx when it should say x : xx .x ...how i can fix that??

I THINK the problem is in this piece of code...but I'M NOT SURE

BeHuman(ticks)
{
new HumanTime[10], minutes, seconds, secstring[2], msecstring[3];
minutes=ticks/60000;
ticks=ticks-(minutes*60000);
seconds=ticks/1000;
ticks=ticks-(seconds*1000);
if(seconds <10) format(secstring,sizeof(secstring),"0%d",seconds);
else format(secstring,sizeof(secstring),"%d",seconds);
format(HumanTime,sizeof(HumanTime),"%d:%s",minutes ,secstring);
if(ticks < 10) format(msecstring,sizeof(msecstring),"00%d", ticks);
else if(ticks < 100) format(msecstring,sizeof(msecstring),"0%d",ticks);
else format(msecstring,sizeof(msecstring),"%d",ticks);
format(HumanTime,sizeof(HumanTime),"%s.%s",HumanTi me,msecstring);
return HumanTime;
}

please someone help me D: !!!
Reply
#2

but why did u change it, when i used it i thought it was awesome.
Reply
#3

For me the displayed time are not the right one (i didn't change anything!!)
In the 0.2x the time was ok, and actually with the 0.3x the displayed time is wrong!
Reply
#4

up! i have the same problem, im trying to fix it but... its not easy for me.. i didnt learn enough pawno yet

if someone could do it.. please
Reply
#5

okey... i just fixed it.. try with this code:

Код:
BeHuman(ticks)
{
	new HumanTime[6], minutes, seconds, secstring[2], msecstring[2];
	minutes=ticks/60000;
	ticks=ticks-(minutes*60000);
	seconds=ticks/1000;
	ticks=ticks-(seconds*1000);
	if(seconds <10) format(secstring,sizeof(secstring),"0%d",seconds);
	else format(secstring,sizeof(secstring),"%d",seconds);
	format(HumanTime,sizeof(HumanTime),"%d:%s",minutes,secstring);
	if(ticks < 10) format(msecstring,sizeof(msecstring),"00%d", ticks);
	else if(ticks < 60) format(msecstring,sizeof(msecstring),"0%d",ticks);
	else format(msecstring,sizeof(msecstring),"%d",ticks);
	format(HumanTime,sizeof(HumanTime),"%s%s",HumanTime,msecstring);
	return HumanTime;
}
please, tell me if it works for you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)