07.09.2015, 14:34
Coloque a pasta rRaceSystem dentro da scriptfiles, e tente:
Com isso irб aparecer apenas os nomes das corridas que tem na pasta.. Se quizer clicar na corrida para iniciar й so fazer na ondialogresponde..
PHP код:
CMD:list(playerid, params[])
{
new string[200], string2[000];
new rNameFile[64];
format(rNameFile, sizeof(rNameFile), "/rRaceSystem/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));
format(string2, sizeof(string2), "%s{FF0000}%s\n", string2, RaceNames[x]);
ShowPlayerDialog(playerid, 8855, DIALOG_STYLE_LIST, "{FFF000}Corridas:", string2, "Fechar", "");
}
return 1;
}