SA-MP Forums Archive
Why wont dialog show? - 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: Why wont dialog show? (/showthread.php?tid=203476)



Why wont dialog show? - Anthonyx3' - 27.12.2010

Hey guys, im working on my gamemode, and well this dialog wont show up when needed to:

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 5, -2374.8315,499.9057,29.1996))
    {
        DisablePlayerCheckpoint(playerid);
        PlayerPlaySound(playerid, 1054, 0, 0, 0);
        new message[] = "";
        new message4[] = "";
        new message2[] = "";
        new message3[] = "";
        format(string, sizeof(string),"%s %s %s %s",message,message2,message3,message4);
        ShowPlayerDialog(playerid,666,DIALOG_STYLE_MSGBOX,"Lovegold's District Bank",string,"Continue","Continue");
        return 1;
    }
Anyone could tell me whats wrong with this? thank you


Re: Why wont dialog show? - Gavibro - 27.12.2010

try:
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 5, -2374.8315,499.9057,29.1996))
    {
        DisablePlayerCheckpoint(playerid);
        PlayerPlaySound(playerid, 1054, 0, 0, 0);
        new message[] = " \n";
        new message4[] = " ";
        new message2[] = " ";
        new message3[] = " ";
        format(string, sizeof(string),"%s %s %s %s",message,message2,message3,message4);
        ShowPlayerDialog(playerid,666,DIALOG_STYLE_MSGBOX,"Lovegold's District Bank",string,"Continue","Continue");
        return 1;
    }
If it don't work,mean the position -2374.8315,499.9057,29.1996 is wrong ..


Re: Why wont dialog show? - Anthonyx3' - 27.12.2010

its the correct coords, i drive right into the checkpoint, it disabled and doesnt show dialog


Re: Why wont dialog show? - leong124 - 27.12.2010

First try to put something in the strings.
Empty strings may not work.
Second check if you're in the correct place or not.
Try to add SendClientMessage(playerid,0xFFFFFFFF,"testing"); there to test if the script runs.


Re: Why wont dialog show? - Anthonyx3' - 27.12.2010

i removed my messages from string so i wouldnt be giving away my whole code here, sendclientmessage works.


Re: Why wont dialog show? - rensfromrpas - 27.12.2010

The format seems to be wrong.
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 5, -2374.8315,499.9057,29.1996))
    {
        DisablePlayerCheckpoint(playerid);
        PlayerPlaySound(playerid, 1054, 0, 0, 0);
        new message[128] = "Prolawl's pro";
        new message4[128] = "Prolawl's pro";
        new message2[128] = "Prolawl's pro";
        new message3[128] = "Prolawl's pro";
        format(string, sizeof(string),"%s\n %s\n %s\n %s\n",message,message2,message3,message4);
        ShowPlayerDialog(playerid,666,DIALOG_STYLE_MSGBOX,"Lovegold's District Bank",string,"Continue","Continue");
        return 1;
    }
That should work (not tested)
if this works you should play with it a bit more.


Re: Why wont dialog show? - Anthonyx3' - 27.12.2010

Negative, didnt work.


Re: Why wont dialog show? - rensfromrpas - 27.12.2010

would it compile?


Re: Why wont dialog show? - Joe Staff - 27.12.2010

Does the sound play? It may not be that code that's the problem.


Re: Why wont dialog show? - Anthonyx3' - 27.12.2010

Idk about the sound, dont really care about it, my dialog wont show up at all, i go to to checkpoint, it disables, no dialog tho.