SA-MP Forums Archive
easyDialog.inc - 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: easyDialog.inc (/showthread.php?tid=509614)



easyDialog.inc - NviDa - 27.04.2014

Just installed easyDialog and took this pwn code from Emmet's topic to test it out.

pawn Code:
#define DIALOG_WEAPON (1337)

CMD:weapons(playerid, params[])
{
    ShowPlayerDialog(playerid, DIALOG_WEAPON, DIALOG_STYLE_LIST, "Weapon Menu", "9mm\nSilenced 9mm\nDesert Eagle\nShotgun\nSawn-off Shotgun\nCombat Shotgun", "Select", "Cancel");
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if (dialogid == DIALOG_WEAPON)
    {
        if (response)
        {
            new str[64];
            format(str, 64, "You have selected the '%s'.", inputtext);

            GivePlayerWeapon(playerid, listitem + 22, 500);
            SendClientMessage(playerid, -1, str);
        }
    }
    return 1;
}
Now when I click the spawn button in game, my screen starts blinking in light yellow color,a black box appears saying 'loading' and also it says 'STAY WITHING WORLD BOUNDARIES'.
What to do?


AW: easyDialog.inc - Nero_3D - 27.04.2014

You can change it, they are both just plain text files


Re: easyDialog.inc - NviDa - 27.04.2014

Kay thanks!


AW: easyDialog.inc - Nero_3D - 27.04.2014

Something like that happens if you let the player spawn far of the map

But that is in no way related to easyDialogs because the only public it uses is OnDialogResponse


Re: easyDialog.inc - Konstantinos - 27.04.2014

Add atleast a class (AddPlayerClass).


Re: easyDialog.inc - NviDa - 27.04.2014

I added a class from my GM now and I'm loose indentation warning.

pawn Code:
#include <a_samp>
#include <zcmd>
#include <easyDialog>

main(){}

public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("LS Riots v1.0");
        AddPlayerClass(265,1723.8688,-1630.1272,20.2140,1.0711,24,1000,27,1000,29,1000); // Cops1
        return 1;
}

CMD:weapons(playerid, params[])
{
    Dialog_Show(playerid, WeaponMenu, DIALOG_STYLE_LIST, "Weapon Menu", "9mm\nSilenced 9mm\nDesert Eagle\nShotgun\nSawn-off Shotgun\nCombat Shotgun", "Select", "Cancel");
    return 1;
}

Dialog:WeaponMenu(playerid, response, listitem, inputtext[])
{
    if (response)
    {
        new str[64];
        format(str, 64, "You have selected the '%s'.", inputtext);

        GivePlayerWeapon(playerid, listitem + 22, 500);
        SendClientMessage(playerid, -1, str);
    }
    return 1;
}



Re: easyDialog.inc - Konstantinos - 27.04.2014

They're not at the same "column".

pawn Code:
public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("LS Riots v1.0");
    AddPlayerClass(265,1723.8688,-1630.1272,20.2140,1.0711,24,1000,27,1000,29,1000); // Cops1
    return 1;
}



Re: easyDialog.inc - NviDa - 27.04.2014

Solved!Thanks