04.04.2014, 15:44
This isn't a dynamic race system. It just runs a single race at a time.
LoadRaceNames function -
There isn't a stock / function for "random(TotalRaces)". / TotalRaces
LoadRaceNames function -
pawn Код:
function LoadRaceNames()
{
new
rNameFile[64],
string[64]
;
format(rNameFile, sizeof(rNameFile), "/RaceNames/RaceNames.txt");
TotalRaces = dini_Int(rNameFile, "TotalRaces");
Loop(x, TotalRaces)
{
format(string, sizeof(string), "Race_%d", x), strmid(RaceNames[x], dini_Get(rNameFile, string), 0, 20, sizeof(RaceNames));
printf(">> Loaded Races: %s", RaceNames[x]);
}
return 1;
}