DIALOG_STYLE_LIST
#1

How can create a DIALOG_STYLE_LIST like this
i dont want create for me
only a a some code or tutorial (I can understand myself)
in this image use /help


and after click some one Commands



Can help me some one
Reply
#2

Should be something like this
pawn Код:
if(!strcmp(cmdtext, "/help", true, 5))
{
    ShowPlayerDialog(playerid, 50, DIALOG_STYLE_LISTITEM, "Text above dialog", "Commands(case0) \nTeles(case1) \nRules(case2) \nCredits(case3)", "Ok", "Cancel");
    return 1;
}

if(dialogid == 50 && response == 1)
{
    switch(listitem)
    {
        case 0: ShowPlayerDialog(playerid, 51, DIALOG_STYLE_MSGBOX, "Text above dialog", "Command 1 \nCommand 2 \nCommand 3", "Ok", "Cancel");
        case 1: ShowPlayerDialog(playerid, 52, DIALOG_STYLE_MSGBOX, "Text above dialog", "Tele 1 \nTele 2 \nTele 3", "Ok", "Cancel");
        case 2: ShowPlayerDialog(playerid, 52, DIALOG_STYLE_MSGBOX, "Text above dialog", "Rule 1 \nRule 2 \nRule 3", "Ok", "Cancel");
        case 3: ShowPlayerDialog(playerid, 52, DIALOG_STYLE_MSGBOX, "Text above dialog", "Credit 1 \nCredit 2 \nCredit 3", "Ok", "Cancel");
    }
    return 1;
}
Reply
#3

Quote:
Originally Posted by Wesley221
Посмотреть сообщение
Should be something like this
pawn Код:
if(!strcmp(cmdtext, "/help", true, 5))
{
    ShowPlayerDialog(playerid, 50, DIALOG_STYLE_LISTITEM, "Text above dialog", "Commands(case0) \nTeles(case1) \nRules(case2) \nCredits(case3)", "Ok", "Cancel");
    return 1;
}

if(dialogid == 50 && response == 1)
{
    switch(listitem)
    {
        case 0: ShowPlayerDialog(playerid, 51, DIALOG_STYLE_MSGBOX, "Text above dialog", "Command 1 \nCommand 2 \nCommand 3", "Ok", "Cancel");
        case 1: ShowPlayerDialog(playerid, 52, DIALOG_STYLE_MSGBOX, "Text above dialog", "Tele 1 \nTele 2 \nTele 3", "Ok", "Cancel");
        case 2: ShowPlayerDialog(playerid, 52, DIALOG_STYLE_MSGBOX, "Text above dialog", "Rule 1 \nRule 2 \nRule 3", "Ok", "Cancel");
        case 3: ShowPlayerDialog(playerid, 52, DIALOG_STYLE_MSGBOX, "Text above dialog", "Credit 1 \nCredit 2 \nCredit 3", "Ok", "Cancel");
    }
    return 1;
}
Код:
D:\G@MES (Lucian™)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(897) : error 004: function "SendAdminMessage" is not implemented
D:\G@MES (Lucian™)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(911) : error 004: function "SendAdminMessage" is not implemented
D:\G@MES (Lucian™)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(923) : error 004: function "SendAdminMessage" is not implemented
D:\G@MES (Lucian™)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1011) : error 017: undefined symbol "isStringSame"
D:\G@MES (Lucian™)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1279) : error 017: undefined symbol "DropPlayerWeapons"
D:\G@MES (Lucian™)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1322) : error 004: function "TimeTextForPlayer" is not implemented
D:\G@MES (Lucian™)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1334) : error 004: function "TimeTextForPlayer" is not implemented
D:\G@MES (Lucian™)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1487) : error 004: function "TimeTextForPlayer" is not implemented
D:\G@MES (Lucian™)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1499) : error 004: function "TimeTextForPlayer" is not implemented
D:\G@MES (Lucian™)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1539) : error 004: function "TimeTextForPlayer" is not implemented
D:\G@MES (Lucian™)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1559) : error 004: function "TimeTextForPlayer" is not implemented
D:\G@MES (Lucian™)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1595) : error 004: function "TimeTextForPlayer" is not implemented
D:\G@MES (Lucian™)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1634) : error 004: function "TimeTextForPlayer" is not implemented
D:\G@MES (Lucian™)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1651) : error 004: function "TimeTextForPlayer" is not implemented
D:\G@MES (Lucian™)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1684) : error 004: function "TimeTextForPlayer" is not implemented
D:\G@MES (Lucian™)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1704) : error 004: function "TimeTextForPlayer" is not implemented
D:\G@MES (Lucian™)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1732) : error 004: function "TimeTextForPlayer" is not implemented
D:\G@MES (Lucian™)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1756) : error 004: function "TimeTextForPlayer" is not implemented
D:\G@MES (Lucian™)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1843) : error 017: undefined symbol "dcmd_ahelp"
D:\G@MES (Lucian™)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1844) : error 017: undefined symbol "dcmd_turfhelp"
D:\G@MES (Lucian™)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1845) : error 017: undefined symbol "dcmd_cmds"
D:\G@MES (Lucian™)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1846) : error 017: undefined symbol "dcmd_rules"
D:\G@MES (Lucian™)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1847) : error 017: undefined symbol "dcmd_credits"
D:\G@MES (Lucian™)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1848) : error 017: undefined symbol "dcmd_me"
D:\G@MES (Lucian™)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1849) : error 017: undefined symbol "dcmd_buyweapon"
D:\G@MES (Lucian™)\GTA San Andreas\LS Gang War\gamemodes\[LS]GangWar.pwn(1850) : error 017: undefined symbol "dcmd_list"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
Quote:

if(!strcmp(cmdtext, "/help", true, 5))
{
ShowPlayerDialog(playerid, 50, DIALOG_STYLE_LIST, "Text above dialog", "Commands(/cmds) \nTurfhelp(/turfhelp) \nRules(/rules) \nCredits(/credits)", "Ok", "Cancel");
return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{

if(dialogid == 50 && response == 1)
{
switch(listitem)
{
case 0: ShowPlayerDialog(playerid, 51, DIALOG_STYLE_MSGBOX, "{00C0FF}Commands", "Command 1 \nCommand 2 \nCommand 3", "Ok", "Cancel");
case 1: ShowPlayerDialog(playerid, 52, DIALOG_STYLE_MSGBOX, "{00C0FF}TurfHelp", "Tele 1 \nTele 2 \nTele 3", "Ok", "Cancel");
case 2: ShowPlayerDialog(playerid, 52, DIALOG_STYLE_MSGBOX, "{00C0FF}Rules", "Rule 1 \nRule 2 \nRule 3", "Ok", "Cancel");
case 3: ShowPlayerDialog(playerid, 52, DIALOG_STYLE_MSGBOX, "{00C0FF}Credits", "Credit 1 \nCredit 2 \nCredit 3", "Ok", "Cancel");
}
return 1;
}

Reply
#4

Are you sure you've closed OnDialogResponse?
Reply
#5

http://forum.sa-mp.com/showthread.ph...53#post1106753 If you still don't understand check that link out it might be able to help you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)