15.09.2017, 17:19
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;
}
THAT S THE COMMAND BUT IN-GAME IT SAYS UNKNOWN COMMAND ! PLEASE HELP
I ADDED SOME RANKS THAT WORKS IN GAME WITH /RANK BUT I CANT SEE THE RANK LIST WTF
{
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;
}
THAT S THE COMMAND BUT IN-GAME IT SAYS UNKNOWN COMMAND ! PLEASE HELP
I ADDED SOME RANKS THAT WORKS IN GAME WITH /RANK BUT I CANT SEE THE RANK LIST WTF