Dialog More menus 1+ rep
#1

Thanks for the help to the cars...

i need help to the more menus in a dialog like " Heavy weapons " " Small weapons " and then i select Heavy weapons wil m4, ak and rocket come up and then i select Small weapons will colt and deagle come up...

Can someone send me a code to it

PHP код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#define DIALOG_WEAPONS 3
#include <a_samp>
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" Blank Filterscript by your name here");
    print(
"--------------------------------------\n");
    return 
1;
}
public 
OnFilterScriptExit()
{
    return 
1;
}
#else
main()
{
    print(
"\n----------------------------------");
    print(
" Blank Gamemode by your name here");
    print(
"----------------------------------\n");
}
#endif
public OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/weapon"cmdtexttrue10) == 0)
    {
        
ShowPlayerDialog(playeridDIALOG_WEAPONSDIALOG_STYLE_LIST"Weapons""Desert Eagle\nAK-47\nCombat Shotgun""Select""Close");
        return 
1;
    }
    return 
0;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == DIALOG_WEAPONS)
    {
        if(
response// If they clicked 'Select' or double-clicked a weapon
        
{
            
// Give them the weapon
            
if(listitem == 0// They selected the first item - Desert Eagle
            
{
                
GivePlayerWeapon(playeridWEAPON_DEAGLE14); // Give them a desert eagle
            
}
            if(
listitem == 1// They selected the second item - AK-47
            
{
                
GivePlayerWeapon(playeridWEAPON_AK47120); // Give them an AK-47
            
}
            if(
listitem == 2// They selected the third item - Desert Eagle
            
{
                
GivePlayerWeapon(playeridWEAPON_SHOTGSPA28); // 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 More menus 1+ rep - by canip - 14.04.2013, 16:07
Re: Dialog More menus 1+ rep - by canip - 14.04.2013, 16:32
Re: Dialog More menus 1+ rep - by mrskull42 - 14.04.2013, 16:44
Re: Dialog More menus 1+ rep - by canip - 14.04.2013, 16:48

Forum Jump:


Users browsing this thread: 1 Guest(s)