[FilterScript] Weapon Dialog
#1

Weapon Dialog

Description

This is a simple weapon dialog with loads of weapons including some special ones.The script is easy to modify, so you will be able to make it as you like.I made that this dialog is for admins but you can change it.And one last thing this isn't a weapon dialog to buy weapons.

Weapons


Chainsaw,
Grenade,
Tear Gas,
Molotov Cocktail,
9mm,
Silenced 9mm,
Desert Eagle,
Shotgun,
Sawnoff Shotgun,
Combat Shotgun,
UZI,
MP5,
AK-47,
M4,
Tec-9,
Country Rifle,
Sniper Rifle,
RPG,
HS Rocket,
Flamethrower,
Minigun,
Satchel Charge,
Detonator,
Parachute.

Specials


Jetpack,
Health,
Armour.

pawn Код:
#include <a_samp>
#include <zcmd>

#define DIALOG_WEAPONS 3
#define red 0xFF0000AA

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("     WeaponDialog By ThePrograme        ");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print("     WeaponDialog By ThePrograme    ");
    print("----------------------------------\n");
}

#endif

CMD:weapons(playerid, params[])
{
    if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid,red,"You have to be an admin to use this command");
    ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Weapons","Chainsaw\nGrenade\nTear Gas\nMolotov Cocktail\n9mm\nSilenced 9mm\nDesert Eagle\nShotgun\nSawnoff Shotgun\nCombat Shotgun\nUZI\nMP5\nAK-47\nM4\nTec-9\nCountry Rifle\nSniper Rifle\nRPG\nHS Rocket\nFlamethrower\nMinigun\nSatchel Charge\nDetonator\nParachute\nJetpack\nHealth\nArmour","Select","Close");
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_WEAPONS)
    {
        if(response)
        {
            if(listitem == 0)
            {
                GivePlayerWeapon(playerid, WEAPON_CHAINSAW, 1);
            }
            if(listitem == 1)
            {
                GivePlayerWeapon(playerid, WEAPON_GRENADE, 99999);
            }
            if(listitem == 2)
            {
                GivePlayerWeapon(playerid, WEAPON_TEARGAS, 99999);
            }
            if(listitem == 3)
            {
                GivePlayerWeapon(playerid, WEAPON_MOLTOV, 99999);
            }
            if(listitem == 4)
            {
                GivePlayerWeapon(playerid, WEAPON_COLT45, 99999);
            }
            if(listitem == 5)
            {
                GivePlayerWeapon(playerid, WEAPON_SILENCED, 99999);
            }
            if(listitem == 6)
            {
                GivePlayerWeapon(playerid, WEAPON_DEAGLE, 99999);
            }
            if(listitem == 7)
            {
                GivePlayerWeapon(playerid, WEAPON_SHOTGUN, 99999);
            }
            if(listitem == 8)
            {
                GivePlayerWeapon(playerid, WEAPON_SAWEDOFF, 99999);
            }
            if(listitem == 9)
            {
                GivePlayerWeapon(playerid, WEAPON_SHOTGSPA, 99999);
            }
            if(listitem == 10)
            {
                GivePlayerWeapon(playerid, WEAPON_UZI, 99999);
            }
            if(listitem == 11)
            {
                GivePlayerWeapon(playerid, WEAPON_MP5, 99999);
            }
            if(listitem == 12)
            {
                GivePlayerWeapon(playerid, WEAPON_AK47, 99999);
            }
            if(listitem == 13)
            {
                GivePlayerWeapon(playerid, WEAPON_M4, 99999);
            }
            if(listitem == 14)
            {
                GivePlayerWeapon(playerid, WEAPON_TEC9, 99999);
            }
            if(listitem == 15)
            {
                GivePlayerWeapon(playerid, WEAPON_RIFLE, 99999);
            }
            if(listitem == 16)
            {
                GivePlayerWeapon(playerid, WEAPON_SNIPER, 99999);
            }
            if(listitem == 17)
            {
                GivePlayerWeapon(playerid, WEAPON_ROCKETLAUNCHER, 99999);
            }
            if(listitem == 18)
            {
                GivePlayerWeapon(playerid, WEAPON_HEATSEEKER, 99999);
            }
            if(listitem == 19)
            {
                GivePlayerWeapon(playerid, WEAPON_FLAMETHROWER, 99999);
            }
            if(listitem == 20)
            {
                GivePlayerWeapon(playerid, WEAPON_MINIGUN, 99999);
            }
            if(listitem == 21)
            {
                GivePlayerWeapon(playerid, WEAPON_SATCHEL, 99999);
            }
            if(listitem == 22)
            {
                GivePlayerWeapon(playerid, WEAPON_BOMB, 1);
            }
            if(listitem == 23)
            {
                GivePlayerWeapon(playerid, WEAPON_PARACHUTE, 1);
            }
            if(listitem == 24)
            {
                SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
            }
            if(listitem == 25)
            {
                SetPlayerHealth(playerid, 100.0);
            }
            if(listitem == 26)
            {
                SetPlayerArmour(playerid, 100.0);
            }
        }
        return 1;
    }
    return 0;
}
Downloads

The link for script (the ZCMD include is in the package):
http://www.solidfiles.com/d/a9ce1581b9/


Credits

Me for desiging the script!
And Zeex fot ZCMD!

+Rep
Reply
#2

Useful code, but great
Reply
#3

I know it is not a pro scripter code but for beginners it's great and useful.
Reply
#4

Sorry that there is no photos but my test server is not working well(and if i download another server the same problem commands not working)
Reply
#5

Nice No need for photos. Repped
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)