15.09.2017, 17:25
Please don't go all caps and please, start using the [PHP] or at least [CODE] tag for PAWN codes in the forums..
However, here's a fixed code:
You should've received lots of errors over missing the closing bracket of the for() loop; at line 9.
Mhm-.
However, here's a fixed code:
PHP код:
CMD:ranks(playerid) {
new string[156], dialogstr[sizeof(string) * sizeof(gRank)];
strcat(dialogstr, "Rank\tRank name\tScore\n");
for(new i; i < sizeof(gRank); i++) {
if(GetPlayerRank(playerid) >= i)
format(string, sizeof(string), ""SAMP_BLUE"%i.\t"SAMP_BLUE"%s\t"SAMP_BLUE"%i+ score\n", i, gRank[i][r_name], gRank[i][r_score]);
else
format(string, sizeof(string), ""GREY"%i.\t"GREY"%s\t"GREY"%i+ score\n", i, gRank[i][r_name], gRank[i][r_score]);
}
strcat(dialogstr, string);
ShowPlayerDialog(playerid, DIALOG_COMMON, DIALOG_STYLE_TABLIST_HEADERS, "Ranks list", dialogstr, "Close", "");
return 1;
}
Mhm-.