31.12.2012, 18:43
(
Последний раз редактировалось NuTShoT; 26.01.2013 в 22:54.
)
@RESOLVIDO +rep A TODOS
if(!strcmp(cmd, "/orgs", true))
{
format(string, sizeof (string), "|__________________________ Orgs __________________________|\n", 500, 500);
format(string, sizeof (string), "%s 1 - Policia Militar LS: %s\n", string, InfoOrg[1][Lider]);
format(string, sizeof (string), "%s 2 - Rotam: %s\n", string, InfoOrg[2][Lider]);
format(string, sizeof (string), "%s 3 - Exercito: %s\n", string, InfoOrg[3][Lider]);
format(string, sizeof (string), "%s 4 - Mйdicos LS: %s\n", string, InfoOrg[4][Lider]);
format(string, sizeof (string), "%s 5 - Aztecas LS: %s\n", string, InfoOrg[5][Lider]);
format(string, sizeof (string), "%s 6 - Guerrilheiros Israelitas: %s\n", string, InfoOrg[6][Lider]);
format(string, sizeof (string), "%s 7 - Prefeito LS: %s\n", string, InfoOrg[7][Lider]);
format(string, sizeof (string), "%s 8 - Hitmans: %s\n", string, InfoOrg[8][Lider]);
format(string, sizeof (string), "%s 9 - Los Santos News: %s\n", string, InfoOrg[9][Lider]);
format(string, sizeof (string), "%s 10 - Taxista LS: %s\n", string, InfoOrg[10][Lider]);
format(string, sizeof (string), "%s 11 - Policia Federal: %s\n", string, InfoOrg[11][Lider]);
format(string, sizeof (string), "%s 12 - Mбfia Cosa Nostra: %s\n", string, InfoOrg[12][Lider]);
return ShowPlayerDialog(playerid, 5241, DIALOG_STYLE_MSGBOX, "Orgs", string, "Ok", #);
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 5241)
{
if(response)
{
format(string, sizeof (string), "|__________________________ Orgs 2 __________________________|\n", 500, 500);
format(string, sizeof (string), "%s 13 - Mбfia Yakuza: %s\n", string, InfoOrg[13][Lider]);
format(string, sizeof (string), "%s 14 - Groove LS: %s\n", string, InfoOrg[14][Lider]);
format(string, sizeof (string), "%s 15 - F.A.R.C: %s\n", string, InfoOrg[15][Lider]);
format(string, sizeof (string), "%s 16 - Policia Civil: %s\n", string, InfoOrg[16][Lider]);
format(string, sizeof (string), "%s 17 - Ballas LS: %s\n", string, InfoOrg[17][Lider]);
format(string, sizeof (string), "%s 18 - Vagos LS: %s\n", string, InfoOrg[18][Lider]);
format(string, sizeof (string), "%s 19 - Comando Vermelho LS: %s\n", string, InfoOrg[19][Lider]);
format(string, sizeof (string), "%s 20 - Sons of Anarchy: %s\n", string, InfoOrg[20][Lider]);
format(string, sizeof (string), "%s 21 - Drifters: %s\n", string, InfoOrg[21][Lider]);
format(string, sizeof (string), "%s 22 - Triads: %s\n", string, InfoOrg[22][Lider]);
format(string, sizeof (string), "%s 23 - PCC LS: %s\n", string, InfoOrg[23][Lider]);
format(string, sizeof (string), "%s 24 - Groove SF: %s\n", string, InfoOrg[24][Lider]);
ShowPlayerDialog(playerid, 5241, DIALOG_STYLE_MSGBOX, "Orgs", string, "Avancar", "voltar");
}
}
if(dialogid == 5241)
{
if(response)
{
format(string, sizeof (string), "|__________________________ Orgs 3 __________________________|\n", 500, 500);
format(string, sizeof (string), "%s 25 - Vagos SF: %s\n", string, InfoOrg[25][Lider]);
format(string, sizeof (string), "%s 26 - PCC SF: %s\n", string, InfoOrg[26][Lider]);
format(string, sizeof (string), "%s 27 - Mйdicos SF: %s\n", string, InfoOrg[27][Lider]);
format(string, sizeof (string), "%s 28 - Comando Vermelho SF: %s\n", string, InfoOrg[28][Lider]);
format(string, sizeof (string), "%s 29 - Ballas SF: %s\n", string, InfoOrg[29][Lider]);
format(string, sizeof (string), "%s 30 - Prefeito SF: %s\n", string, InfoOrg[30][Lider]);
format(string, sizeof (string), "%s 31 - Aztecas SF: %s\n", string, InfoOrg[31][Lider]);
format(string, sizeof (string), "%s 32 - San Fierro News: %s\n", string, InfoOrg[32][Lider]);
format(string, sizeof (string), "%s 33 - Taxista SF: %s\n", string, InfoOrg[33][Lider]);
format(string, sizeof (string), "%s 34 - Policia Militar SF: %s\n", string, InfoOrg[34][Lider]);
format(string, sizeof (string), "%s 35 - Rotam SF: %s", string, InfoOrg[35][Lider]);
ShowPlayerDialog(playerid, 5241, DIALOG_STYLE_MSGBOX, "Orgs", string, "Avancar", "Voltar");
}
else
{
format(string, sizeof (string), "|__________________________ Orgs 2 __________________________|\n", 500, 500);
format(string, sizeof (string), "%s 13 - Mбfia Yakuza: %s\n", string, InfoOrg[13][Lider]);
format(string, sizeof (string), "%s 14 - Groove LS: %s\n", string, InfoOrg[14][Lider]);
format(string, sizeof (string), "%s 15 - F.A.R.C: %s\n", string, InfoOrg[15][Lider]);
format(string, sizeof (string), "%s 16 - Policia Civil: %s\n", string, InfoOrg[16][Lider]);
format(string, sizeof (string), "%s 17 - Ballas LS: %s\n", string, InfoOrg[17][Lider]);
format(string, sizeof (string), "%s 18 - Vagos LS: %s\n", string, InfoOrg[18][Lider]);
format(string, sizeof (string), "%s 19 - Comando Vermelho LS: %s\n", string, InfoOrg[19][Lider]);
format(string, sizeof (string), "%s 20 - Sons of Anarchy: %s\n", string, InfoOrg[20][Lider]);
format(string, sizeof (string), "%s 21 - Drifters: %s\n", string, InfoOrg[21][Lider]);
format(string, sizeof (string), "%s 22 - Triads: %s\n", string, InfoOrg[22][Lider]);
format(string, sizeof (string), "%s 23 - PCC LS: %s\n", string, InfoOrg[23][Lider]);
format(string, sizeof (string), "%s 24 - Groove SF: %s\n", string, InfoOrg[24][Lider]);
ShowPlayerDialog(playerid, 5241, DIALOG_STYLE_MSGBOX, "Orgs", string, "Avancar", "voltar");
}
}
if(dialogid == 5241)
{
if(response)
{
format(string, sizeof (string), "|__________________________ Orgs 4 __________________________|\n", 500, 500);
format(string, sizeof (string), "%s 36 - DETRAN: %s\n", string, InfoOrg[36][Lider]);
format(string, sizeof (string), "%s 37 - Bombeiros: %s", string, InfoOrg[37][Lider]);
ShowPlayerDialog(playerid, 5241, DIALOG_STYLE_MSGBOX, "Orgs", string, "Ok", #);
}
}
return 1;
}
pawn Код:
|
Aumente a string da format , jogue todos em um comando e use Strcat.
|
new Dialog_Orgs_Toni[700];
if(!strcmp(cmd, "/orgs", true))
{
format(string, sizeof (string), "|__________________________ Orgs __________________________|\n", 500, 500);
format(string, sizeof (string), "%s 1 - Policia Militar LS: %s\n", string, InfoOrg[1][Lider]);strcat(Dialog_Orgs_Toni,string);
format(string, sizeof (string), "%s 2 - Rotam: %s\n", string, InfoOrg[2][Lider]);strcat(Dialog_Orgs_Toni,string);
format(string, sizeof (string), "%s 3 - Exercito: %s\n", string, InfoOrg[3][Lider]);strcat(Dialog_Orgs_Toni,string);
format(string, sizeof (string), "%s 4 - Mйdicos LS: %s\n", string, InfoOrg[4][Lider]);strcat(Dialog_Orgs_Toni,string);
format(string, sizeof (string), "%s 5 - Aztecas LS: %s\n", string, InfoOrg[5][Lider]);strcat(Dialog_Orgs_Toni,string);
format(string, sizeof (string), "%s 6 - Guerrilheiros Israelitas: %s\n", string, InfoOrg[6][Lider]);strcat(Dialog_Orgs_Toni,string);
format(string, sizeof (string), "%s 7 - Prefeito LS: %s\n", string, InfoOrg[7][Lider]);strcat(Dialog_Orgs_Toni,string);
format(string, sizeof (string), "%s 8 - Hitmans: %s\n", string, InfoOrg[8][Lider]);strcat(Dialog_Orgs_Toni,string);
format(string, sizeof (string), "%s 9 - Los Santos News: %s\n", string, InfoOrg[9][Lider]);strcat(Dialog_Orgs_Toni,string);
format(string, sizeof (string), "%s 10 - Taxista LS: %s\n", string, InfoOrg[10][Lider]);strcat(Dialog_Orgs_Toni,string);
format(string, sizeof (string), "%s 11 - Policia Federal: %s\n", string, InfoOrg[11][Lider]);strcat(Dialog_Orgs_Toni,string);
format(string, sizeof (string), "%s 12 - Mбfia Cosa Nostra: %s\n", string, InfoOrg[12][Lider]);strcat(Dialog_Orgs_Toni,string);
return ShowPlayerDialog(playerid, 5241, DIALOG_STYLE_MSGBOX, "Orgs", Dialog_Orgs_Toni, "Ok", #);
}