Why wont dialog show?
#1

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
Reply
#2

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 ..
Reply
#3

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

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.
Reply
#5

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

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.
Reply
#7

Negative, didnt work.
Reply
#8

would it compile?
Reply
#9

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

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)