Help?
#3

Quote:
Originally Posted by SAMProductions
Посмотреть сообщение
Like This ?

pawn Код:
CMD:testdialogcmd(playerid, params[])
{
    ShowPlayerDialog(playerid, DIALOG_TESTDIALOG1, DIALOG_STYLE_LIST, "{FF0000}Test Dialogs", "{FF0000}Test Dialog 1:\nTest Item 1\nTest Item 2\nTest Item 3\nTest Item 4\nTest Item 5\n{00FF00}NEXT", "Ok", "");
    }
    return 1;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_TESTDIALOG1)
    {
        switch(listitem)
        {
            case 0:
            {
                //Selected Item: "{FF0000}Test Dialog 1"
            }
            case 1:
            {
                //Selected Item: "Test Item 1"
            }
            case 2:
            {
                //Selected Item: "Test Item 2"
            }
            case 3:
            {
                //Selected Item: "Test Item 3"
            }
            case 4:
            {
                //Selected Item: "Test Item 4"
            }
            case 5:
            {
                //Selected Item: "Test Item 5"
            }
            case 6:
            {
                ShowPlayerDialog(playerid, DIALOG_TESTDIALOG2, DIALOG_STYLE_LIST, "Test Dialogs", "{FF0000}Test Dialog 2:\nTest1\nTest2\nTest3\nTest4\nTest5", "OK", "");
            }
        }
    }
    if(dialogid == DIALOG_TESTDIALOG2)
    {
        switch(listitem)
        {
            case 0:
            {
                //Selected Item: "{FF0000}Test Dialog 2"
            }
            case 1:
            {
                //Selected Item: "Test1"
            }
            case 2:
            {
                //Selected Item: "Test2"
            }
            case 3:
            {
                //Selected Item: "Test3"
            }
            case 4:
            {
                //Selected Item: "Test4"
            }
            case 5:
            {
                //Selected Item: "Test5"
            }
        }
    }
    return 1;
}
By the way i am using ZCMD:

Код:
#include <zcmd>
If you want to use it with CMDs, All you need to do is:

Код:
			case 0:
			{
				//Selected Item: "{FF0000}Test Dialog 1"
			}
			case 1:
			{
				cmd_yourcommandname
			}
Change "cmd_yourcommandname" into your Commands, like for example "cmd_ann" = Announce Command.
mhmh minse is different, it does not look like that
Код:
CommandsDialog(playerid, title[])			// --- Commands Dialog --- //
{
    new string[2048];
	strcat(string, "\
	/Accept\t\t\t- Accept a duel request\n\
	{3C3B3D}________________________________________________________________________\n\
	/Buy\t\t\t- Buy a property\n\
	{3C3B3D}________________________________________________________________________\n\
	/Calc\t\t\t- Calculator\n\
    {3C3B3D}________________________________________________________________________\n\
	/Carchase\t\t- Locate the Carchase vehicle\n\
	{3C3B3D}________________________________________________________________________\n\
	");
	strcat(string, "\
	/Carcolor\t\t- Change your car color\n\
	{3C3B3D}________________________________________________________________________\n\
	/Chance\t\t- Take a chance\n\
	{3C3B3D}________________________________________________________________________\n\
	/Color\t\t\t- Change your color\n\
	{3C3B3D}________________________________________________________________________\n\
	/Deny\t\t\t- Deny a duel request\n\
	{3C3B3D}________________________________________________________________________\n\
	");
	strcat(string, "\
	/DM\t\t\t- See a list of Deathmatches\n\
	{3C3B3D}________________________________________________________________________\n\
	/Duel\t\t\t- Duel a player\n\
	{3C3B3D}________________________________________________________________________\n\
	/Eject\t\t\t- Eject a player from your vehicle\n\
	{3C3B3D}________________________________________________________________________\n\
	/Fs\t\t\t- Change your fighting style\n\
	");
	strcat(string, "\
	{3C3B3D}________________________________________________________________________\n\
	/Getid\t\t\t- Get a players ID\n\
	{3C3B3D}________________________________________________________________________\n\
 	/Goto\t\t\t- Teleport to a player\n\
    {3C3B3D}________________________________________________________________________\n\
 	/Jetpack\t\t- Get a jackpack\n\
 	{3C3B3D}________________________________________________________________________\n\
 	");
	strcat(string, "\
 	/Join\t\t\t- Join a race\n\
 	{3C3B3D}________________________________________________________________________\n\
 	/Loadpos\t\t- Load your saved position\n\
 	{3C3B3D}________________________________________________________________________\n\
 	/Lock\t\t\t- Lock your vehicles doors\n\
 	{3C3B3D}________________________________________________________________________\n\
 	/Myprops\t\t- See a list of properties you own\n\
 	");
	strcat(string, "\
 	{3C3B3D}________________________________________________________________________\n\
 	/Nitro\t\t\t- Toggle nitro On / Off\n\
 	{3C3B3D}________________________________________________________________________\n\
 	/Para\t\t\t- Get a parachute\n\
 	{3C3B3D}________________________________________________________________________\n\
 	/Pay\t\t\t- Give a player some of your money\n\
 	{3C3B3D}________________________________________________________________________\n\
 	/PM\t\t\t- Send a private message\n\
 	");
    ShowPlayerDialog(playerid, Cmds_Dialog, MSGBOX, title, string, "Next", "Close");
	return 1;
}
Reply


Messages In This Thread
Help? - by eblood1 - 29.10.2013, 03:19
Re: Help? - by SAMProductions - 29.10.2013, 03:29
Re: Help? - by eblood1 - 29.10.2013, 03:35
Re: Help? - by SAMProductions - 29.10.2013, 03:50
Re: Help? - by eblood1 - 29.10.2013, 04:13
Re: Help? - by Pottus - 29.10.2013, 04:35

Forum Jump:


Users browsing this thread: 1 Guest(s)