SA-MP Forums Archive
Problem with dialog. - 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: Problem with dialog. (/showthread.php?tid=406804)



can anyone help me with my dialog? - Oscii - 11.01.2013

Hello. I've got a problem with my dialog showing up OnPlayerSpawn.

I'm trying to make it so if the player hasn't done the test and the variable is 0 it will show the RP test, but it won't show at all!

The code is below:

pawn Код:
if(playerVariables[playerid][pTest] == 0)
    {
    ShowPlayerDialog(playerid,DIALOG_QUIZ,DIALOG_STYLE_LIST,"What does RP stands for?"," Real Pussy \n Role Play \n Real Money","Select","Leave Game"); // -------
    }
Anyone know a solution?


Re: Problem with dialog. - JavoDiaz - 11.01.2013

try this:

pawn Код:
if(!playerVariables[playerid][pTest]) return ShowPlayerDialog(playerid, 361, DIALOG_STYLE_LIST, "What does Rp stands for?", "Real pussy\nRole Play\nReal Money", "Select", "Leave");
I've changed the dialogid.


Re: Problem with dialog. - Oscii - 11.01.2013

Still,doesn't work!


Re: Problem with dialog. - TvW - 11.01.2013

Are you sure that "playerVariables[playerid][pTest]" is defined before in the script? And also is set to 0 at some time?
Maybe test the dialog itself without the 'if'. So:
pawn Код:
//if(playerVariables[playerid][pTest] == 0)
//    {
    ShowPlayerDialog(playerid,DIALOG_QUIZ,DIALOG_STYLE_LIST,"What does RP stands for?"," Real Pussy \n Role Play \n Real Money","Select","Leave Game"); // -------
//    }