Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- |||||||||||||||||||||||||||||||||||||||||||||||||
- ||Weapon Store By AlexzzPro ||
- ||Please keep the credits to me ||
- ||Contact me on SA-MP Forum for any questions ||
- ||www.forum.sa-mp.com/member.php?u=116256 ||
- |||||||||||||||||||||||||||||||||||||||||||||||||
- */
- //||--Defines & Includes--||//
- #include <a_samp>
- #define FILTERSCRIPT
- #define COLOR_YELLOW 0xFFFF00AA
- //||--Pickups--||//
- new iWeapon; // The pickup of the weapon store
- //||--Dialogs--||//
- #define WEAPON1 1337
- #define WEAPON2 1338
- #define WEAPON3 1339
- #define WEAPON4 1400
- #define WEAPON5 1401
- #define WEAPON6 1402
- #define WEAPON7 1403
- //||--Weapon Prices--||//
- new deagle = 1000; //Price of the deagle
- new shotgun = 4000;//Price of the shotgun
- new mp5 = 3000; //Price of the mp5
- new m4 = 5000;//Price of the M4
- new sniper = 10000;// Price of the Sniper
- new spas = 8000;//Price of the Spas12
- //||--Weapon Ammos--||//
- new deagleammo = 200; // The ammo for deagle
- new shotgunammo = 100; // The ammo for shotgun
- new mp5ammo = 300; // The ammo for mp5
- new m4ammo = 500; // The ammo for M4
- new sniperammo = 100; // The ammo for Sniper Rifle
- new spasammo = 400; // The ammo for Spas12
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Weapon Store By AlexzzPro");
- print("--------------------------------------\n");
- iWeapon = CreatePickup(1318, 23, 1577.7579, -1474.5370, 14.2209);
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #endif
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid == iWeapon)
- {
- ShowPlayerDialog(playerid, WEAPON1, DIALOG_STYLE_LIST, "Illegal Market - Weapon Store","Deagle[$1000]\nShotgun[$4000]\nMP5[$3000]\nM4[$5000]\nSniper Rifle[$10.000\nSpas12[$8000]","Buy","Close");
- return 1;
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == WEAPON7)
- {
- if(response)
- {
- GivePlayerMoney(playerid, -spas);
- GivePlayerWeapon(playerid, 27, spasammo);
- SendClientMessage(playerid, COLOR_YELLOW, "You purchased a Spas12 for $8000");
- }
- if(!response)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "Alright, Come back when you changed your mind");
- }
- }
- if(dialogid == WEAPON6)
- {
- if(response)
- {
- GivePlayerMoney(playerid, -sniper);
- GivePlayerWeapon(playerid, 34, sniperammo);
- SendClientMessage(playerid, COLOR_YELLOW, "You purchased a Sniper Rifle for $10.000");
- }
- if(!response)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "Alright, Come back when you changed your mind");
- }
- }
- if(dialogid == WEAPON5)
- {
- if(response)
- {
- GivePlayerMoney(playerid, -m4);
- GivePlayerWeapon(playerid, 31, m4ammo);
- SendClientMessage(playerid, COLOR_YELLOW, "You purchased a M4 for $5000");
- }
- if(!response)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "Alright, Come back when you changed your mind");
- }
- }
- if(dialogid == WEAPON4)
- {
- if(response)
- {
- GivePlayerMoney(playerid, -mp5);
- GivePlayerWeapon(playerid, 29, mp5ammo);
- SendClientMessage(playerid, COLOR_YELLOW, "You purchased a MP5 for $3000");
- }
- if(!response)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "Alright, Come back when you changed your mind");
- }
- }
- if(dialogid == WEAPON3)
- {
- if(response)
- {
- GivePlayerMoney(playerid, -shotgun);
- GivePlayerWeapon(playerid, 25, shotgunammo);
- SendClientMessage(playerid, COLOR_YELLOW, "You purchased a shotgun for $4000");
- }
- if(!response)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "Alright, Come back when you changed your mind");
- }
- }
- if(dialogid == WEAPON2)
- {
- if(response)
- {
- GivePlayerMoney(playerid, -deagle);
- GivePlayerWeapon(playerid, 24, deagleammo);
- SendClientMessage(playerid, COLOR_YELLOW, "You purchased a deagle for $1000");
- }
- if(!response)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "Alright, Come back when you changed your mind");
- }
- }
- if(dialogid == WEAPON1)
- {
- if(response)
- {
- if(listitem == 0)
- {
- if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough money!");
- {
- ShowPlayerDialog(playerid, WEAPON2, DIALOG_STYLE_MSGBOX, "Deagle","Do you wish to purchase a deagle for {FF0000}$1000","Yes","No");
- }
- }
- if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) < 4000) return SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough money!");
- {
- ShowPlayerDialog(playerid, WEAPON3, DIALOG_STYLE_MSGBOX, "Shotgun","Do you wish to purchase a shotgun for {FF0000}$4000","Yes","No");
- }
- }
- if(listitem == 2)
- {
- if(GetPlayerMoney(playerid) < 3000) return SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough money!");
- {
- ShowPlayerDialog(playerid, WEAPON4, DIALOG_STYLE_MSGBOX, "MP5","Do you wish to purchase a MP5 for {FF0000}$3000","Yes","No");
- }
- }
- if(listitem == 3)
- {
- if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough money!");
- {
- ShowPlayerDialog(playerid, WEAPON5, DIALOG_STYLE_MSGBOX, "M4","Do you wish to purchase a M4 for {FF0000}$5000","Yes","No");
- }
- }
- if(listitem == 4)
- {
- if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough money!");
- {
- ShowPlayerDialog(playerid, WEAPON6, DIALOG_STYLE_MSGBOX, "Sniper Rifle","Do you wish to purchase a Sniper Rifle for {FF0000}$100000","Yes","No");
- }
- }
- if(listitem == 5)
- {
- if(GetPlayerMoney(playerid) < 8000) return SendClientMessage(playerid, COLOR_YELLOW, "You don't have enough money!");
- {
- ShowPlayerDialog(playerid, WEAPON7, DIALOG_STYLE_MSGBOX, "Spas12","Do you wish to purchase a Spas12 for {FF0000}$8000","Yes","No");
- }
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement