SA-MP Forums Archive
Dialog style list - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Dialog style list (/showthread.php?tid=212940)



Dialog style list - Typhome - 18.01.2011

///////////////////////////////////


Re: Dialog style list - Toreno - 18.01.2011

Try... not tested;
pawn Код:
if(strcmp(cmd, "/perekond", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        new
            number = 0,
            str[999];
        for(new i = 0; i < sizeof(FamilyInfo); i++) {
            format(asi, sizeof(asi), "{DBED15}Perekond: %d {FFFFFF}| {15D4ED}Nimi: %s {FFFFFF}| {8CED15}Liider: %s {FFFFFF}| {DB881A}Liikmed: %d",number,FamilyInfo[i][FamilyName],FamilyInfo[i][FamilyLeader],FamilyInfo[i][FamilyMembers]);
            number ++;
            strcat(str, asi, sizeof(str));
        }
        ShowPlayerDialog(playerid, DIALOOG_PEREKOND, DIALOG_STYLE_LIST, "Perekond", asi, "Vali", "Loobu");
    }
    return 1;
}



Re: Dialog style list - Typhome - 18.01.2011

/////////////////////////


Re: Dialog style list - Toreno - 18.01.2011

lol, woops... I forgot, I have changed it and give you the wrong one.
Try this; (still not tested...)
pawn Код:
if(strcmp(cmd, "/perekond", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        new
            number = 0,
            str[999];
        for(new i = 0; i < sizeof(FamilyInfo); i++) {
            format(asi, sizeof(asi), "{DBED15}Perekond: %d {FFFFFF}| {15D4ED}Nimi: %s {FFFFFF}| {8CED15}Liider: %s {FFFFFF}| {DB881A}Liikmed: %d",number,FamilyInfo[i][FamilyName],FamilyInfo[i][FamilyLeader],FamilyInfo[i][FamilyMembers]);
            number ++;
            strcat(str, asi, sizeof(str));
        }
        ShowPlayerDialog(playerid, DIALOOG_PEREKOND, DIALOG_STYLE_LIST, "Perekond", asi, "Vali", "Loobu");
    }
    return 1;
}



Re: Dialog style list - Typhome - 18.01.2011

///////////////////////////////