10.01.2015, 14:19
Do not reply if you don't even understand English at a basic level, what part of "This code turns into this code" do you not understand?
This code (without easydialog):
Looks like this, with easydialog include:
Please stop replying as you seem to lack the knowledge required to assist me in this matter.
This code (without easydialog):
pawn Код:
#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;
}
pawn Код:
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;
}