28.08.2014, 13:38
Hi!
I use rRace and how can i make this record system(Check Attachments 2. line)?
The Race File
I use rRace and how can i make this record system(Check Attachments 2. line)?
pawn Код:
public OnPlayerEnterRaceCheckpoint(playerid)
{
if(FinishCount <= 5)
{
format(rFile, sizeof(rFile), "/rRaceSystem/%s.RRACE", RaceName);
format(string, sizeof(string), "BestRacerTime_%d", TimeProgress);
TempTotalTime = dini_Int(rFile, string);
ConvertTime(var1, TempTotalTime, TempTime[0], TempTime[1], TempTime[2]);
if(TotalRaceTime <= dini_Int(rFile, string) || TempTotalTime == 0)
{
dini_IntSet(rFile, string, TotalRaceTime);
format(string, sizeof(string), "BestRacer_%d", TimeProgress);
if(TempTotalTime != 0) format(string, sizeof(string), ">> \"%s\" has broken the record of \"%s\" with \"%d\" seconds faster on the \"%d\"'st/th place!", pName, dini_Get(rFile, string), -(rTime[1] - TempTime[1]), TimeProgress+1);
else format(string, sizeof(string), ">> \"%s\" has broken a new record of on the \"%d\"'st/th place!", pName, TimeProgress+1);
SendClientMessageToAll(GREEN, " ");
SendClientMessageToAll(GREEN, string);
SendClientMessageToAll(GREEN, " ");
format(string, sizeof(string), "BestRacer_%d", TimeProgress);
dini_Get(rFile, string, pName);
TimeProgress++;
}
}
Код:
BestRacer_0=HerBan. BestRacerTime_1=0 BestRacer_1=noone BestRacerTime_2=0 BestRacer_2=noone BestRacerTime_3=0 BestRacer_3=noone BestRacerTime_4=0 BestRacer_4=noone