Help needed with dialogs
#1

I wanted to setup the prices of the dialogs to be shown nicely in one column, let me give you an example.
Deagle $100
Tec-9 $100
Is there a way to make it look like this in game?
Reply
#2

pawn Код:
ShowPlayerDialog(playerid, 225, DIALOG_STYLE_LIST, "Weapons", "Deagle $100  \nTec-9 $100", "Ok", "");
Reply
#3

Код:
#define DIALOG_WEAPONS 1960   // place it after all <include> functions
Код:
ShowPlayerDialog(playerid, DIALOG_WEAPONS, DILOAG_STYLE_LIST,"Weapons", "Deagle $100 \nM4 150$ \nSawn-off $200","Select","Cancel");
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_WEAPONS)
    {
        if(response) // If they clicked 'Select' or double-clicked a weapon
        {
            // Give them the weapon
            switch(listitem)
            {
                case 0: {
                      GivePlayerWeapon(playerid, 24, 999); // Give them a desert eagle 
                      GivePlayerMoney(playerid, -100);  // take $100 form player
                }
                case 1: {
                      GivePlayerWeapon(playerid, 31, 9999); // Give them an M4
                      GivePlayerMoney(playerid, -150);  // take $150 form player 
                }
                case 2: {
                      GivePlayerWeapon(playerid, 26, 9999); // Give them a Sawnoff
                      GivePlayerMoney(playerid, -200);  // take $100 form player
                }
            }
        }
        return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
    }
 
    return 0; // You MUST return 0 here! Just like OnPlayerCommandText.
}
Reply
#4

Quote:
Originally Posted by BroZeus
Посмотреть сообщение
Yep there is
use '\t' for tabulating the data
example-

The output would be clean
It's fixed now.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)