Help me with Weapon Dialog REP++
#8

PHP код:
#include <a_samp> 

/*         Weapons Dialog 
                by 
            Private200          */ 

//=======================[Colors]==================== 
#define COLOR_LIGHTBLUE 0x33CCFFAA 
#define COLOR_RED 0xAA3333AA 
#define COLOR_GREY 0xAFAFAFAA 
#define COLOR_YELLOW 0xFFFF00AA 
#define COLOR_PINK 0xFF66FFAA 
#define COLOR_BLUE 0x0000BBAA 
#define COLOR_WHITE 0xFFFFFFAA 
#define COLOR_DARKRED 0x660000AA 
#define COLOR_ORANGE 0xFF9900AA 
#define COLOR_BRIGHTRED 0xFF0000AA 
#define COLOR_INDIGO 0x4B00B0AA 
#define COLOR_VIOLET 0x9955DEEE 
#define COLOR_LIGHTRED 0xFF99AADD 
#define COLOR_SEAGREEN 0x00EEADDF 
#define COLOR_GRAYWHITE 0xEEEEFFC4 
#define COLOR_LIGHTNEUTRALBLUE 0xabcdef66 
#define COLOR_GREENISHGOLD 0xCCFFDD56 
#define COLOR_LIGHTBLUEGREEN 0x0FFDD349 
#define COLOR_NEUTRALBLUE 0xABCDEF01 
#define COLOR_LIGHTCYAN 0xAAFFCC33 
#define COLOR_LEMON 0xDDDD2357 
#define COLOR_MEDIUMBLUE 0x63AFF00A 
#define COLOR_NEUTRAL 0xABCDEF97 
#define COLOR_BLACK 0x00000000 
#define COLOR_NEUTRALGREEN 0x81CFAB00 
#define COLOR_DARKGREEN 0x12900BBF 
#define COLOR_LIGHTGREEN 0x24FF0AB9 
#define COLOR_DARKBLUE 0x300FFAAB 
#define COLOR_BLUEGREEN 0x46BBAA00 
#define COLOR_PINK 0xFF66FFAA 
#define COLOR_LIGHTBLUE 0x33CCFFAA 
#define COLOR_DARKRED 0x660000AA 
#define COLOR_ORANGE 0xFF9900AA 
#define COLOR_PURPLE 0x800080AA 
#define COLOR_GRAD1 0xB4B5B7FF 
#define COLOR_GRAD2 0xBFC0C2FF 
#define COLOR_RED1 0xFF0000AA 
#define COLOR_GREY 0xAFAFAFAA 
#define COLOR_GREEN 0x33AA33AA 
#define COLOR_RED 0xAA3333AA 
#define COLOR_YELLOW 0xFFFF00AA 
#define COLOR_WHITE 0xFFFFFFAA 
#define COLOR_BROWN 0x993300AA 
#define COLOR_CYAN 0x99FFFFAA 
#define COLOR_TAN 0xFFFFCCAA 
#define COLOR_PINK 0xFF66FFAA 
#define COLOR_KHAKI 0x999900AA 
#define COLOR_LIME 0x99FF00AA 
#define COLOR_SYSTEM 0xEFEFF7AA 
#define COLOR_GRAD2 0xBFC0C2FF 
#define COLOR_GRAD4 0xD8D8D8FF 
#define COLOR_GRAD6 0xF0F0F0FF 
#define COLOR_GRAD2 0xBFC0C2FF 
#define COLOR_GRAD3 0xCBCCCEFF 
#define COLOR_GRAD5 0xE3E3E3FF 
#define COLOR_GRAD1 0xB4B5B7FF 
//=======================[End of Colors]====================== 

#define DIALOG_WEAPONS 5986

public OnFilterScriptInit() 

    print(
"\n--------------------------------------"); 
    print(
" Weapons FS by Private200"); 
    print(
"--------------------------------------\n"); 
    return 
1


public 
OnPlayerConnect(playerid)
{
     
WeaponDialogs[playerid] = 1;
     return 
1;
}

public 
OnPlayerSpawn(playerid)
{
     if(
WeaponDialogs[playerid] == 1)
     {
     
ShowPlayerDialog(playeridDIALOG_WEAPONSDIALOG_STYLE_LIST"What type of weapon do you want?""Melee Weapons \nPistols\nShotguns\nSub-Machine Guns\nRifles\nJetpack\nCamera\nMinigun""Search""Cancel"); 
     
WeaponDialogs[playerid] = 0;
     }
     return 
1;
}  

public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[]) 

    if(
dialogid == DIALOG_WEAPONS
    { 
        if(
response
        { 
            if(
listitem == 0
            { 
                
ShowPlayerDialog(playeridDIALOG_WEAPONS+1DIALOG_STYLE_LIST"Chose your melee weapon:""Brass Knuckles \nGolf Club\nKnife\nBaseball bat\nChainsaw""Get""Cancel"); 
            } 
            if(
listitem == 1
            { 
                
ShowPlayerDialog(playeridDIALOG_WEAPONS+2DIALOG_STYLE_LIST"Chose your pistol:""9MM \nSilenced 9mm\nDesert Eagle""Get""Cancel"); 
            } 
            if(
listitem == 2)    // The third item listed 
            

                
ShowPlayerDialog(playeridDIALOG_WEAPONS+3DIALOG_STYLE_LIST"Chose your pistol:""Shotgun \nSawnoff Shotgun\nCombat Shotgun""Get""Cancel"); 
            } 
            if(
listitem == 3)    //The third item listed 
            

                
ShowPlayerDialog(playeridDIALOG_WEAPONS+4DIALOG_STYLE_LIST"Chose your pistol:""Micro UZI \nMP5\nAK-47\nM4\nTec-9""Get""Cancel"); 
            } 
            if(
listitem == 4//The fourth item listed 
            

                
ShowPlayerDialog(playeridDIALOG_WEAPONS+5DIALOG_STYLE_LIST"Chose your pistol:""Country Rifle \nSniper Rifle""Get""Cancel"); 
            } 
            if(
listitem == 5//The fourth item listed 
            

                
SetPlayerSpecialAction(playerid,2); 
            } 
            if(
listitem == 6//The fourth item listed 
            

                
GivePlayerWeapon(playerid4350000); 
            } 
            if(
listitem == 7//The fourth item listed 
            

                
GivePlayerWeapon(playerid3850000); 
            } 
        } 
        return 
1
    } 

    if(
dialogid == DIALOG_WEAPONS+1
    { 
        if(
response
        { 
            if(
listitem == 0
            { 
                
GivePlayerWeapon(playerid15); 
            } 
            if(
listitem == 1
            { 
                
GivePlayerWeapon(playerid22); 
            } 
            if(
listitem == 2
            { 
                
GivePlayerWeapon(playerid42); 
            } 
            if(
listitem == 3
            { 
                
GivePlayerWeapon(playerid52); 
            } 
            if(
listitem == 4
            { 
                
GivePlayerWeapon(playerid92); 
            } 
        } 
        return 
1
    } 
    if(
dialogid == DIALOG_WEAPONS+2
    { 
        if(
response
        { 
            if(
listitem == 0
            { 
                
GivePlayerWeapon(playerid2250000); 
            } 
            if(
listitem == 1
            { 
                
GivePlayerWeapon(playerid2350000); 
            } 
            if(
listitem == 2
            { 
                
GivePlayerWeapon(playerid2450000); 
            } 
        } 
        return 
1
    } 
    if(
dialogid == DIALOG_WEAPONS+3
    { 
        if(
response
        { 
            if(
listitem == 0
            { 
                
GivePlayerWeapon(playerid2550000); 
            } 
            if(
listitem == 1
            { 
                
GivePlayerWeapon(playerid2650000); 
            } 
            if(
listitem == 2
            { 
                
GivePlayerWeapon(playerid2750000); 
            } 
        } 
        return 
1
    } 
    if(
dialogid == DIALOG_WEAPONS+4
    { 
        if(
response
        { 
            if(
listitem == 0
            { 
                
GivePlayerWeapon(playerid2850000); 
            } 
            if(
listitem == 1
            { 
                
GivePlayerWeapon(playerid2950000); 
            } 
            if(
listitem == 2
            { 
                
GivePlayerWeapon(playerid3050000); 
            } 
            if(
listitem == 3
            { 
                
GivePlayerWeapon(playerid3150000); 
            } 
            if(
listitem == 4
            { 
                
GivePlayerWeapon(playerid3250000); 
            } 
        } 
        return 
1
    } 
    if(
dialogid == DIALOG_WEAPONS+5
    { 
        if(
response
        { 
            if(
listitem == 0
            { 
                
GivePlayerWeapon(playerid3350000); 
            } 
            if(
listitem == 1
            { 
                
GivePlayerWeapon(playerid3450000); 
            } 
        } 
        return 
1
    } 
I ain't sure if this is what you want, but I think, it's okay.
Reply


Messages In This Thread
Help me with Weapon Dialog REP++ - by Configuration - 08.04.2013, 10:16
Re: Help me with Weapon Dialog REP++ - by ]Rafaellos[ - 08.04.2013, 11:11
Re: Help me with Weapon Dialog REP++ - by Configuration - 08.04.2013, 11:34
Re: Help me with Weapon Dialog REP++ - by Private200 - 08.04.2013, 11:38
Re: Help me with Weapon Dialog REP++ - by Configuration - 08.04.2013, 11:45
Re: Help me with Weapon Dialog REP++ - by Private200 - 08.04.2013, 11:55
Re: Help me with Weapon Dialog REP++ - by Configuration - 08.04.2013, 12:02
Re: Help me with Weapon Dialog REP++ - by Private200 - 08.04.2013, 12:07
Re: Help me with Weapon Dialog REP++ - by Configuration - 08.04.2013, 12:24

Forum Jump:


Users browsing this thread: 4 Guest(s)