[FilterScript] Simple Weapon Dialog.
#1

Simple Weapon Dialog.



Info:-


When you spawn it shows you a dialog with two weapons packages
Package 1 :
Shawn-OFF Shotgun, UZI, Desert Eagle, AK47. Each weapon with 5000 bullets.

Package 2 :
MP5, M4, Sniper, ShotGun Each weapon with 5000 bullets

And when you choose a package it shows you a text with the packages includes you picked.

I'm not a very good coder, but still I can code.

Screenshots :


Link for pastebin code :-
http://pastebin.com/T748nhQe

Код:
#define FILTERSCRIPT
     
    #define DIALOG_WEAPON 2
    #define COLOR_RED 0xAA3333AA
     
    #include <a_samp>
     
    #if defined FILTERSCRIPT
     
    public OnFilterScriptInit()
    {
            print("\n--------------------------------------");
            print(" Weapons Dialog By Zeal");
            print("--------------------------------------\n");
            return 1;
    }
     
    public OnFilterScriptExit()
    {
            return 1;
    }
     
    main()
    {
            print("\n----------------------------------");
            print("Weapons Dialog By Zeal");
            print("----------------------------------\n");
    }
   
     
    public OnPlayerSpawn(playerid)
    {
        ShowPlayerDialog(playerid, DIALOG_WEAPON, DIALOG_STYLE_LIST, "Weapons Packages By Zeal", "Package 1\nPackage 2", "Select", "Exit");
            return 1;
    }
     
    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
            if(dialogid == 2)
            {
                    if(response)
      {
                            if(listitem == 0)
            GivePlayerWeapon(playerid, 28, 5000);
        GivePlayerWeapon(playerid, 26, 5000);
        GivePlayerWeapon(playerid, 30, 5000);
        GivePlayerWeapon(playerid, 24, 5000);
        SendClientMessage(playerid, COLOR_RED, "You picked Package 1 - Shawn-OFF Shotgun, UZI, Desert Eagle, AK47. Each weapon with 5000 bullets.");
                    }
                    if(listitem == 1)
                    {
        GivePlayerWeapon(playerid, 29, 5000);
        GivePlayerWeapon(playerid, 31, 5000);
        GivePlayerWeapon(playerid, 34, 5000);
        GivePlayerWeapon(playerid, 25, 5000);
        SendClientMessage(playerid, COLOR_RED, "You picked Package 2 - MP5, M4, Sniper, ShotGun Each weapon with 5000 bullets ");
                    }
                    return 1;
            }
            return 1;
    }
Corrected - thanks to LivingLikeYouDo.


Bugs :-
There is no bugs, if there is report them in replies.

Credits :-
All credits returns to Zeal/Zeel.
Feel free to do anything with this script!

Kind regards,
Zeel.
Reply


Messages In This Thread
Simple Weapon Dialog. - by Zeel - 28.12.2014, 13:28
Re: Simple Weapon Dialog. - by Glossy42O - 28.12.2014, 13:30
Re: Simple Weapon Dialog. - by UltraScripter - 28.12.2014, 13:31
Re: Simple Weapon Dialog. - by durd2001 - 28.12.2014, 13:43
Re: Simple Weapon Dialog. - by Tookieson - 28.12.2014, 13:52
Re: Simple Weapon Dialog. - by LivingLikeYouDo - 28.12.2014, 15:04
Re: Simple Weapon Dialog. - by JaydenJason - 28.12.2014, 16:15
Re: Simple Weapon Dialog. - by Luicy. - 28.12.2014, 16:19
Re: Simple Weapon Dialog. - by LivingLikeYouDo - 29.12.2014, 06:05
Re: Simple Weapon Dialog. - by AgusZ - 29.12.2014, 06:31

Forum Jump:


Users browsing this thread: 1 Guest(s)