Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Title :- Weapon Shop v1.0
- Author :- Sly (GShock)
- SA-MP forum :- http://forum.sa-mp.com/member.php?u=212767
- Script link :- http://pastebin.com/VU2cMphQ
- */
- #include <a_samp>
- #include <zcmd>
- #define DIALOG_WEAPON 69 /* ( Change this ID if your gamemode already has a dialog with this ID) */
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_WEAPON)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: ShowPlayerDialog(playerid, 70, DIALOG_STYLE_LIST, "Melee", "Brass Knuckles\nGolf Club\nNightstick\nKnife\nBaseball Bat\nShovel\nPool Cue\nKatana\nChainsaw", "Go", "Exit");
- case 1: ShowPlayerDialog(playerid, 71, DIALOG_STYLE_LIST, "Pistols", "9mm\nSilenced 9mm\nDesert Eagle", "Go", "Exit");
- case 2: ShowPlayerDialog(playerid, 72, DIALOG_STYLE_LIST, "Shotguns", "Shotgun\nSawnoff Shotgun\nCombat Shotgun", "Go", "Exit");
- case 3: ShowPlayerDialog(playerid, 73, DIALOG_STYLE_LIST, "Sub Machines", "Uzi\nMP5\nTec-9", "Go", "Exit");
- case 4: ShowPlayerDialog(playerid, 74, DIALOG_STYLE_LIST, "Rifles", "AK-47\nM4\nCountry Rifle\nSniper Rifle", "Go", "Exit");
- case 5: ShowPlayerDialog(playerid, 75, DIALOG_STYLE_LIST, "Thrown", "Tear Gas\nMolotov Cocktail", "Go", "Exit");
- case 6: ShowPlayerDialog(playerid, 76, DIALOG_STYLE_LIST, "Other", "Fire Extinguisher\nCamera", "Go", "Exit");
- }
- }
- }
- if(dialogid == 70)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: GivePlayerWeapon(playerid, 1, 0x7FFFFFFF);
- case 1: GivePlayerWeapon(playerid, 2, 0x7FFFFFFF);
- case 2: GivePlayerWeapon(playerid, 3, 0x7FFFFFFF);
- case 3: GivePlayerWeapon(playerid, 4, 0x7FFFFFFF);
- case 4: GivePlayerWeapon(playerid, 5, 0x7FFFFFFF);
- case 5: GivePlayerWeapon(playerid, 6, 0x7FFFFFFF);
- case 6: GivePlayerWeapon(playerid, 7, 0x7FFFFFFF);
- case 7: GivePlayerWeapon(playerid, 8, 0x7FFFFFFF);
- case 8: GivePlayerWeapon(playerid, 9, 0x7FFFFFFF);
- }
- }
- }
- if(dialogid == 71)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: GivePlayerWeapon(playerid, 22, 0x7FFFFFFF);
- case 1: GivePlayerWeapon(playerid, 23, 0x7FFFFFFF);
- case 2: GivePlayerWeapon(playerid, 24, 0x7FFFFFFF);
- }
- }
- }
- if(dialogid == 72)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: GivePlayerWeapon(playerid, 25, 0x7FFFFFFF);
- case 1: GivePlayerWeapon(playerid, 26, 0x7FFFFFFF);
- case 2: GivePlayerWeapon(playerid, 27, 0x7FFFFFFF);
- }
- }
- }
- if(dialogid == 73)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: GivePlayerWeapon(playerid, 28, 0x7FFFFFFF);
- case 1: GivePlayerWeapon(playerid, 29, 0x7FFFFFFF);
- case 2: GivePlayerWeapon(playerid, 32, 0x7FFFFFFF);
- }
- }
- }
- if(dialogid == 74)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: GivePlayerWeapon(playerid, 30, 0x7FFFFFFF);
- case 1: GivePlayerWeapon(playerid, 31, 0x7FFFFFFF);
- case 2: GivePlayerWeapon(playerid, 33, 0x7FFFFFFF);
- case 3: GivePlayerWeapon(playerid, 34, 0x7FFFFFFF);
- }
- }
- }
- if(dialogid == 75)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: GivePlayerWeapon(playerid, 17, 5);
- case 1: GivePlayerWeapon(playerid, 18, 5);
- }
- }
- }
- if(dialogid == 76)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: GivePlayerWeapon(playerid, 42, 70);
- case 1: GivePlayerWeapon(playerid, 43, 0x7FFFFFFF);
- }
- }
- }
- return 1;
- }
- CMD:weaponshop(playerid, params[])
- {
- ShowPlayerDialog(playerid, DIALOG_WEAPON, DIALOG_STYLE_LIST, "{00ff00}Weapon Shop by Sly", "Melee\nPistols\nShotguns\nSub Machines\nRifles\nThrown\nOther", "Next", "Exit");
- SendClientMessage(playerid , -1 ,"This script it brought to you by Sly! (GShock)");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement