Dialog,Help me
#4

But I try and put this , the wiki to test , and again we come to the dialogue pasword ...


Код:
#define DIALOG_WEAPONS 3
 
// In some command
ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Weapons", "Desert Eagle\nAK-47\nCombat Shotgun", "Select", "Close");
 
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_WEAPONS)
    {
        if(response) // If they clicked 'Select' or double-clicked a weapon
        {
            // Give them the weapon
            switch(listitem)
            {
                case 0: GivePlayerWeapon(playerid, WEAPON_DEAGLE, 14); // Give them a desert eagle
                case 1: GivePlayerWeapon(playerid, WEAPON_AK47, 120); // Give them an AK-47
                case 2: GivePlayerWeapon(playerid, WEAPON_SHOTGSPA, 28); // Give them a Combat Shotgun
            }
        }
        return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
    }
 
    return 0; // You MUST return 0 here! Just like OnPlayerCommandText.
}
Reply


Messages In This Thread
Dialog,Help me - by Savana221 - 14.05.2016, 08:25
Re: Dialog,Help me - by Recardo - 14.05.2016, 08:38
Re: Dialog,Help me - by oMa37 - 14.05.2016, 08:39
Re: Dialog,Help me - by Savana221 - 14.05.2016, 08:55
Re: Dialog,Help me - by oMa37 - 14.05.2016, 09:25
Re: Dialog,Help me - by Logic_ - 14.05.2016, 09:35
Re: Dialog,Help me - by oMa37 - 14.05.2016, 09:41

Forum Jump:


Users browsing this thread: 2 Guest(s)