02.07.2016, 04:43
I here to just promote my dialogs.inc!
Here is one easy way of doing what you need with a better method:
Here is one easy way of doing what you need with a better method:
pawn Код:
CMD:melee(playerid)
{
return ShowPlayerDialog(playerid, 50, DIALOG_STYLE_PREVMODEL, "Melee Weapons", "1\nBrass Knuckle\n2\nGolf club\n3\nNitestick\n4\nKnife", "Select", "Close");
}
public OnDialogResonse(playerid, dialogid, response, listitem, inputtext[])
{
if (dialogid == 50)
{
switch (listitem)
{
case 0: GivePlayerWeapon(playerid, 1, 1);
case 1: GivePlayerWeapon(playerid, 2, 1);
case 2: GivePlayerWeapon(playerid, 3, 1);
case 3: GivePlayerWeapon(playerid, 4, 1);
}
}