25.01.2014, 12:46
Galera na ppc_trucking eu mudei a box na ppc_common de DIALOG_STYLE_LIST para DIALOG_STYLE_MSGBOX, e ela ficou assim :http://prntscr.com/2m8w79 e nгo avanзa as paginas quando clico em prox,
aqui estб o codigo :
E agora oque faзo para por quando o player clicar em prox ele avanзar as paginas ?
aqui estб o codigo :
Код:
CommandList_Create(playerid) { // Setup local variables new Counter, CommandList[1000], DialogTitle[128]; // Only add 4 commands to the list, starting from the FirstItem for (new i = APlayerData[playerid][DialogFirstItem]; i < sizeof(ACommands); i++) { // Increase a counter (which holds the number of commands that have been added to the list Counter++; // Check if the maximum hasn't been reached yet if (Counter <= 5) { // Check if this command is valid for this player if (APlayerData[playerid][PlayerLevel] >= ACommands[i][CommandLevel]) { // Check if the command is used for admins or not if (ACommands[i][CommandLevel] == 0) { // Add the commandname and description to the list format(CommandList, 500, "%s%s{00FF00}%s", CommandList, "\n", ACommands[i][CommandStructure]); // Add the name of the next command to the list on the next line format(CommandList, 500, "%s%s\t\t{FFFF00}%s", CommandList, "\n", ACommands[i][CommandDescription]); // Add the description of the next command to the list on the next line } else { // Add the commandname and description to the list format(CommandList, 500, "%s%sLvl %i: {00FF00}%s", CommandList, "\n", ACommands[i][CommandLevel], ACommands[i][CommandStructure]); // Add the name of the next command to the list on the next line format(CommandList, 500, "%s%s\t\t{FFFF00}%s", CommandList, "\n", ACommands[i][CommandDescription]); // Add the description of the next command to the list on the next line } } else break; } else // 5 commands have been added to the list (now Counter = 6) { // Add an empty line and "Next..." to the list to let the player know there are more commands format(CommandList, 500, "%s%s%s", CommandList, "\n \n", TXT_DialogEntryNext); // Also stop the For-loop break; } } // Construct the title for the dialog (to include a page number) format(DialogTitle, 128, TXT_DialogCommandTitle, (APlayerData[playerid][DialogFirstItem] / 5) + 1); // Show the commands in a dialog ShowPlayerDialog(playerid, DialogPlayerCommands, DIALOG_STYLE_MSGBOX, DialogTitle, CommandList, TXT_DialogButtonSelect, TXT_DialogButtonCancel); return 1; }