SA-MP Forums Archive
Dialog Problem! - 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)
+--- Thread: Dialog Problem! (/showthread.php?tid=343334)



Dialog Problem! - CyberSnaak - 17.05.2012

Hello,

Ok so this is my player enum:
pawn Код:
enum pInfo
{
    pPass,
    pCash,
    pAdminLevel,
    pGender,
    pAge,
    pSkin,
    pNew
}
new PlayerInfo[MAX_PLAYERS][pInfo];
And here is my dialog:
pawn Код:
case DIALOG_REG:
        {
            if(!response) return Kick ( playerid );
            new INI:File = INI_Open(UserPath(playerid));
            switch( listitem )
            {
                case 0:
                {
                    INI_WriteInt(File, "Age", PlayerInfo[playerid][pAge]);
                    SendClientMessage(playerid, COLOR_GREY, "Great, so we have your age!");
                }
                case 1:
                {
                    INI_WriteInt(File, "Age", PlayerInfo[playerid][pAge]);
                    SendClientMessage(playerid, COLOR_GREY, "Great, so we have your age!");
                }
                case 2:
                {
                    INI_WriteInt(File, "Age", PlayerInfo[playerid][pAge]);
                    SendClientMessage(playerid, COLOR_GREY, "Great, so we have your age!");
                }
                case 3:
                {
                    INI_WriteInt(File, "Age", PlayerInfo[playerid][pAge]);
                    SendClientMessage(playerid, COLOR_GREY, "Great, so we have your age!");
                }
                case 4:
                {
                    INI_WriteInt(File, "Age", PlayerInfo[playerid][pAge]);
                    SendClientMessage(playerid, COLOR_GREY, "Great, so we have your age!");
                }
                case 5:
                {
                    INI_WriteInt(File, "Age", PlayerInfo[playerid][pAge]);
                    SendClientMessage(playerid, COLOR_GREY, "Great, so we have your age!");
                }
                case 6:
                {
                    INI_WriteInt(File, "Age", PlayerInfo[playerid][pAge]);
                    SendClientMessage(playerid, COLOR_GREY, "Great, so we have your age!");
                }
                case 7:
                {
                    INI_WriteInt(File, "Age", PlayerInfo[playerid][pAge]);
                    SendClientMessage(playerid, COLOR_GREY, "Great, so we have your age!");
                }
                case 8:
                {
                    INI_WriteInt(File, "Age", PlayerInfo[playerid][pAge]);
                    SendClientMessage(playerid, COLOR_GREY, "Great, so we have your age!");
                }
                case 9:
                {
                    INI_WriteInt(File, "Age", PlayerInfo[playerid][pAge]);
                    SendClientMessage(playerid, COLOR_GREY, "Great, so we have your age!");
                }
                case 10:
                {
                    INI_WriteInt(File, "Age", PlayerInfo[playerid][pAge]);
                    SendClientMessage(playerid, COLOR_GREY, "Great, so we have your age!");
                }
                case 11:
                {
                    INI_WriteInt(File, "Age", PlayerInfo[playerid][pAge]);
                    SendClientMessage(playerid, COLOR_GREY, "Great, so we have your age!");
                }
            }
            INI_Close(File);
        }
    }
    return 1;
}
but this is the outcome and it doesn't save the number they pressed! (say they pressed 1.
pawn Код:
Age = 0
[data]
Password = 256967457
Cash = 0
AdminLevel = 0



Re: Dialog Problem! - TzAkS. - 17.05.2012

What style of dialog is DIALOG_REG ?


Re: Dialog Problem! - MP2 - 17.05.2012

That's his dialogid..


Re: Dialog Problem! - TzAkS. - 17.05.2012

Quote:
Originally Posted by MP2
Посмотреть сообщение
That's his dialogid..
I know that )
But thats is for Dialog ID and i wos talking about style..i think he is using MSGBOX.
Show me where you show the dialog.


Re: Dialog Problem! - TzAkS. - 17.05.2012

Quote:
Originally Posted by ******
Посмотреть сообщение
Nowhere in that code do you set their age or the ini tag.
That`s why i asked about dialog style.
Set the age like this

INI_WriteInt(File, "Age", Number);
Put the number with that case..when selected..this is only way like this.
But better is to make id DIALOG_STYLE_INPUT