#1

i have a rank system in my server and it s got 21 ranks...if i want to add more, i can add 3-4 but if i add
more than 15-20 it says command /ranks (Unknown Command) when i try to see the rank list on server

can you help me?
Reply
#2

We can't help you without an y code.
Reply
#3

You were faster ^^
Reply
#4

//rank system
enum RankEnum
{
r_name[30],
r_score
};
//Add as many rnaks you want, don't worry about rest of the script, ADVANCE!
//If you want to edit the bonus of ranks, then go to OnPlayerSpawn
new gRank[][RankEnum] =
{
{"Newbie", 0},
{"Begginer", 50},
{"Specialist", 100},
{"Super Specialist", 200},
{"Gunnery", 500},
{"Chief", 1000},
{"Master Chief", 1500},
{"Ensign", 2500},
{"Killer", 4500},
{"Lieutenant", 8000},
{"Captain", 10000},
{"Commander", 13000},
{"Major", 15000},
{"Sexy Major", 20000},
{"Brigadier", 25000},
{"General", 40000},
{"Field Marshal", 55000},
{"Killer", 70000},
{"Warlord", 150000},
{"Master Of War", 200000},
{"God Of War", 999999999}
};




and /ranks command that dont work if i add more than 20 ranks



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;
}
Reply
#5

What script are you using ?

Do you have skype ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)