PHP код:
// command /ranks
new string[500];
string[0] = EOS;
switch(team)
{
case TEAM_MAFIA:
{
new i;
for(i = 0; i < sizeof(MafiaRank); i++)
{
new dmsg[32];
format(dmsg, sizeof(dmsg), ""col_team_mafia"%s \t "col_white"Requered Level "col_team_mafia"[%d]\n", MafiaRank[i][rName], MafiaRank[i][rLevel]);
strcat(string, dmsg);
}
ShowPlayerDialog(playerid, DIALOG_RANK_MAFIA, DIALOG_STYLE_LIST, "Choose your rank", string, "Select", "Cancel");
}
}
PHP код:
#define col_team_mafia "{669999}"
#define col_white "{FFFFFF}"
enum RankInfo { rLevel, rSkin, rName[32], rDescription[128] }
new MafiaRank[][RankInfo] =
{
{ 0, 126, "Name 1", "Description 1" },
{ 2, 126, "Name 2", "Description 2" },
{ 4, 126, "Name 3", "Description 3" },
{ 6, 126, "Name 4", "Description 4" },
{ 9, 126, "Name 5", "Description 5" },
{ 12, 126, "Name 6", "Description 6" },
{ 15, 126, "Name 7", "Description 7" },
{ 18, 126, "Name 8", "Description 8" },
{ 23, 126, "Name 9", "Description 9" },
{ 28, 126, "Name 10", "Description 10" },
{ 34, 126, "Name 11", "Description 11" },
{ 0, 126, "Name 12", "Description 12" }
};