easyDialog.inc
#1

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

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

Kay thanks!
Reply
#4

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

Add atleast a class (AddPlayerClass).
Reply
#6

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;
}
Reply
#7

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;
}
Reply
#8

Solved!Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)