SA-MP Forums Archive
Dialogs Not Working [REP ++] - 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: Dialogs Not Working [REP ++] (/showthread.php?tid=428722)



Dialogs Not Working [REP ++] - Walker1997 - 06.04.2013

Why my dialogs not working ? I type a /duty and the dialog not showing for players ? Why ? Need help please Repp !

pawn Код:
//----------------------------------[offduty]-----------------------------------------------
    if(strcmp(cmd, "/duty", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1||PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pLeader] == 2||PlayerInfo[playerid][pMember] == 3||PlayerInfo[playerid][pLeader] == 3)
            {
                if (PlayerToPoint(3, playerid,254.8067,73.6996,1003.6406) || PlayerToPoint(3,playerid,249.6026,123.7238,1003.2188) || PlayerToPoint(3,playerid,2432.4268,-2120.2708,13.5469))
                {
                    ShowPlayerDialog(playerid, DUTYMENU, DIALOG_STYLE_LIST, "Dolznost Meni","Oprema\nOruzje\nUniformi", "OK", "Izlez");
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "{FF4040}GRESKA:{FFFFFF}Ne ste na mesto  za da zemete znacka !");
                    return 1;
                }
            }
        }
        return 1;
    }



Re: Dialogs Not Working [REP ++] - HurtLocker - 06.04.2013

just make sure you got it between public onplayercommands text :
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/duty", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pMember]==1 || PlayerInfo[playerid][pLeader]==1 || PlayerInfo[playerid][pMember]==2 || PlayerInfo[playerid][pLeader]==2 || PlayerInfo[playerid][pMember]==3 || PlayerInfo[playerid][pLeader]==3)
            {
                if (PlayerToPoint(3, playerid,254.8067,73.6996,1003.6406) || PlayerToPoint(3,playerid,249.6026,123.7238,1003.2188) || PlayerToPoint(3,playerid,2432.4268,-2120.2708,13.5469))
                {
                    ShowPlayerDialog(playerid, DUTYMENU, DIALOG_STYLE_LIST, "Dolznost Meni","Oprema\nOruzje\nUniformi", "OK", "Izlez");
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GRAD2, "{FF4040}GRESKA:{FFFFFF}Ne ste na mesto  za da zemete znacka !");
                    return 1;
                }
            }
        }
        return 1;
    }
    return 0;
}