Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <zcmd>
- /* 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_ORANGE 0xFF9900AA
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_RED 0xAA3333AA
- //=======================[End of Colors]======================
- #define DIALOG_WEAPONS 1337
- #define DIALOG_WEAPONS1 1338
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Weapons FS by Private200");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- CMD:shop(playerid, cmdtext[])
- {
- ShowPlayerDialog(playerid, DIALOG_WEAPONS1, DIALOG_STYLE_LIST, "Chose below. Go to the next step:", "Weapons \nSkin", "Search", "Cancel");
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_WEAPONS1)
- {
- if(response)
- {
- if(listitem == 0)
- {
- ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Chose below. Go to the next step:", "Melee Weapons \nPistols\nShotguns\nSub-Machine Guns\nRifles\nJetpack\nCamera\nMinigun", "Search", "Cancel");
- }
- if(listitem == 1)
- {
- ShowPlayerDialog(playerid, 5000, DIALOG_STYLE_INPUT, "Skin Changer", "Type the skin ID here(0-299):", "Submit", "Cancel");
- }
- return 1;
- }
- }
- if(dialogid == 5000)
- {
- if(response)
- {
- new skinid, message[64];
- skinid = strval(inputtext);
- if(skinid < 0 || skinid > 299)
- {
- SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Skin id may be between 0 and 299.");
- }
- else
- {
- SetPlayerSkin(playerid, skinid);
- format(message, sizeof(message), "SERVER: You have changed your skin id to %d.", skinid);
- SendClientMessage(playerid, 0xFFFFFFFF, message);
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_WEAPONS)
- {
- if(response)
- {
- if(listitem == 0)
- {
- ShowPlayerDialog(playerid, DIALOG_WEAPONS+1, DIALOG_STYLE_LIST, "Chose your melee weapon:", "Brass Knuckles \nGolf Club\nKnife\nBaseball bat\nChainsaw", "Get", "Cancel");
- }
- if(listitem == 1)
- {
- ShowPlayerDialog(playerid, DIALOG_WEAPONS+2, DIALOG_STYLE_LIST, "Chose your pistol:", "9MM \nSilenced 9mm\nDesert Eagle", "Get", "Cancel");
- }
- if(listitem == 2) // The third item listed
- {
- ShowPlayerDialog(playerid, DIALOG_WEAPONS+3, DIALOG_STYLE_LIST, "Chose your pistol:", "Shotgun \nSawnoff Shotgun\nCombat Shotgun", "Get", "Cancel");
- }
- if(listitem == 3) //The third item listed
- {
- ShowPlayerDialog(playerid, DIALOG_WEAPONS+4, DIALOG_STYLE_LIST, "Chose your pistol:", "Micro UZI \nMP5\nAK-47\nM4\nTec-9", "Get", "Cancel");
- }
- if(listitem == 4) //The fourth item listed
- {
- ShowPlayerDialog(playerid, DIALOG_WEAPONS+5, DIALOG_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(playerid, 43, 50000);
- }
- if(listitem == 7) //The fourth item listed
- {
- GivePlayerWeapon(playerid, 38, 50000);
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_WEAPONS+1)
- {
- if(response)
- {
- if(listitem == 0)
- {
- GivePlayerWeapon(playerid, 1, 5);
- }
- if(listitem == 1)
- {
- GivePlayerWeapon(playerid, 2, 2);
- }
- if(listitem == 2)
- {
- GivePlayerWeapon(playerid, 4, 2);
- }
- if(listitem == 3)
- {
- GivePlayerWeapon(playerid, 5, 2);
- }
- if(listitem == 4)
- {
- GivePlayerWeapon(playerid, 9, 2);
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_WEAPONS+2)
- {
- if(response)
- {
- if(listitem == 0)
- {
- GivePlayerWeapon(playerid, 22, 50000);
- }
- if(listitem == 1)
- {
- GivePlayerWeapon(playerid, 23, 50000);
- }
- if(listitem == 2)
- {
- GivePlayerWeapon(playerid, 24, 50000);
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_WEAPONS+3)
- {
- if(response)
- {
- if(listitem == 0)
- {
- GivePlayerWeapon(playerid, 25, 50000);
- }
- if(listitem == 1)
- {
- GivePlayerWeapon(playerid, 26, 50000);
- }
- if(listitem == 2)
- {
- GivePlayerWeapon(playerid, 27, 50000);
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_WEAPONS+4)
- {
- if(response)
- {
- if(listitem == 0)
- {
- GivePlayerWeapon(playerid, 28, 50000);
- }
- if(listitem == 1)
- {
- GivePlayerWeapon(playerid, 29, 50000);
- }
- if(listitem == 2)
- {
- GivePlayerWeapon(playerid, 30, 50000);
- }
- if(listitem == 3)
- {
- GivePlayerWeapon(playerid, 31, 50000);
- }
- if(listitem == 4)
- {
- GivePlayerWeapon(playerid, 32, 50000);
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_WEAPONS+5)
- {
- if(response)
- {
- if(listitem == 0)
- {
- GivePlayerWeapon(playerid, 33, 50000);
- }
- if(listitem == 1)
- {
- GivePlayerWeapon(playerid, 34, 50000);
- }
- }
- return 1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement