09.08.2010, 07:47
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: !!!
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: !!!