05.10.2014, 15:16
pawn Code:
CMD:faction(playerid, params[])
{
new szDialog[256];
if(!PermissionCheck(playerid, 6)) return ShowPlayerDialog(playerid, EDITFACTION_FAC_LEADER, DIALOG_STYLE_LIST, "Select a Option", "Name\nRank0\nRank1\nRank2\nRank3\nRank4\nRank5\nRank6\nRank7\nRank8\nRank9\nRank10", "Select", "Quit");
//ShowPlayerDialog(playerid, EDITFACTION_FACID, DIALOG_STYLE_INPUT, "Editfaction", "Enter the faction id you want to edit:", "Select", "Close");
for(new i = 0; i < MAX_FACTIONS; i++)
{
if(GroupInfo[i][gActive] == 1)
{
format(szDialog, sizeof(szDialog), "Name: %s - Type: %i - ID: %i", GroupInfo[i][gName], GroupInfo[i][gType], GroupInfo[i][gGroupID]-1);
ShowPlayerDialog(playerid, EDITFACTION_LISTFACS, DIALOG_STYLE_LIST, "List of Factions", szDialog, "Select", "Close");
}
}
return 1;
}
pawn Code:
for(new i = 0; i < MAX_FACTIONS; i++)
{
if(GroupInfo[i][gActive] == 1)
{
format(szDialog, sizeof(szDialog), "Name: %s - Type: %i - ID: %i", GroupInfo[i][gName], GroupInfo[i][gType], GroupInfo[i][gGroupID]-1);
ShowPlayerDialog(playerid, EDITFACTION_LISTFACS, DIALOG_STYLE_LIST, "List of Factions", szDialog, "Select", "Close");
}
}