Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is a comment
- // uncomment the line below if you want to write a filterscript
- #define FILTERSCRIPT
- #include <a_samp>
- #include <zcmd>
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Ammunation Weapon Shop by Milan_Huizen");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" Blank Gamemode by your name here");
- print("----------------------------------\n");
- }
- #endif
- CMD:buywep(playerid, params[])
- {
- if(IsPlayerInRangeOfPoint(playerid, 20, 312.9659, -137.4177, 999.6016))
- {
- ShowPlayerDialog(playerid, 12345, DIALOG_STYLE_LIST, "Ammunation Weapon Shop", "Melee Weapons\nSub MachineGuns\nShotGuns\nHand Guns", "Choose", "Cancel");
- return 1;
- }
- else return SendClientMessage(playerid, 0xFF330000, "You are not in the Ammunation located at Market LS!");
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch(dialogid) {
- case 12345:
- {
- if(!response) return SendClientMessage(playerid, 0xFF330000, "You did not buy a gun! Visit again anytime soon!");
- switch(listitem) {
- case 0:
- {
- ShowPlayerDialog(playerid, 601, DIALOG_STYLE_LIST, "Melee Weapons", "Bat $150\nIron Glove $170\nNightStick $150", "Buy", "Cancel");
- return 1;
- }
- case 1:
- {
- ShowPlayerDialog(playerid, 602, DIALOG_STYLE_LIST, "Sub Machine Guns", "MP5 $2000\n Uzi $1900\n Tec-9 $1900", "Buy", "Cancel");
- return 1;
- }
- case 2:
- {
- ShowPlayerDialog(playerid, 603, DIALOG_STYLE_LIST, "Shotguns", "Shotgun $2500\nSawnoff Shotgun $2600\nCombat Shotgun $3100", "Buy", "Cancel");
- return 1;
- }
- case 3:
- {
- ShowPlayerDialog(playerid, 604, DIALOG_STYLE_LIST, "Hand Guns", "Colt45 $700\nSilenced $700\nDesert Eagle $1400", "Buy", "Cancel");
- return 1;
- }
- }
- }
- case 601:
- {
- if(!response) return SendClientMessage(playerid, 0xFF330000, "You did not buy a gun! Visit again anytime soon!");
- switch(listitem) {
- case 0:
- {
- if(GetPlayerMoney(playerid) >= 150)
- {
- GivePlayerWeapon(playerid, 5, 1);
- GivePlayerMoney(playerid, -150);
- SendClientMessage(playerid, 0x00B300FF, "Weapon bought!");
- return 1;
- }
- else return SendClientMessage(playerid, 0x0000002B, "Not enough money!");
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) >= 170)
- {
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerMoney(playerid, -170);
- SendClientMessage(playerid, 0x00B300FF, "Weapon bought!");
- return 1;
- }
- else return SendClientMessage(playerid, 0x0000002B, "Not enough money!");
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) >= 150)
- {
- GivePlayerWeapon(playerid, 3, 1);
- GivePlayerMoney(playerid, -150);
- SendClientMessage(playerid, 0x00B300FF, "Weapon bought!");
- return 1;
- }
- else return SendClientMessage(playerid, 0x0000002B, "Not enough money!");
- }
- }
- }
- case 604:
- {
- if(!response) return SendClientMessage(playerid, 0xFF330000, "You did not buy a gun! Visit again anytime soon!");
- switch(listitem) {
- case 0:
- {
- if(GetPlayerMoney(playerid) >= 700)
- {
- GivePlayerWeapon(playerid, 22, 56);
- GivePlayerMoney(playerid, -700);
- SendClientMessage(playerid, 0x00B300FF, "Weapon bought!");
- return 1;
- }
- else return SendClientMessage(playerid, 0x0000002B, "Not enough money!");
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) >= 700)
- {
- GivePlayerWeapon(playerid, 23, 56);
- GivePlayerMoney(playerid, -700);
- SendClientMessage(playerid, 0x00B300FF, "Weapon bought!");
- return 1;
- }
- else return SendClientMessage(playerid, 0x0000002B, "Not enough money!");
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) >= 1400)
- {
- GivePlayerWeapon(playerid, 24, 56);
- GivePlayerMoney(playerid, -1400);
- SendClientMessage(playerid, 0x00B300FF, "Weapon bought!");
- return 1;
- }
- else return SendClientMessage(playerid, 0x0000002B, "Not enough money!");
- }
- }
- }
- case 603:
- {
- if(!response) return SendClientMessage(playerid, 0xFF330000, "You did not buy a gun! Visit again anytime soon!");
- switch(listitem) {
- case 0:
- {
- if(GetPlayerMoney(playerid) >= 2500)
- {
- GivePlayerWeapon(playerid, 25, 100);
- GivePlayerMoney(playerid, -2500);
- SendClientMessage(playerid, 0x00B300FF, "Weapon bought!");
- return 1;
- }
- else return SendClientMessage(playerid, 0x0000002B, "Not enough money!");
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) >= 2600)
- {
- GivePlayerWeapon(playerid, 26, 100);
- GivePlayerMoney(playerid, -2600);
- SendClientMessage(playerid, 0x00B300FF, "Weapon bought!");
- return 1;
- }
- else return SendClientMessage(playerid, 0x0000002B, "Not enough money!");
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) >= 3100)
- {
- GivePlayerWeapon(playerid, 27, 120);
- GivePlayerMoney(playerid, -3100);
- SendClientMessage(playerid, 0x00B300FF, "Weapon bought!");
- return 1;
- }
- else return SendClientMessage(playerid, 0x0000002B, "Not enough money!");
- }
- }
- }
- case 602:
- {
- if(!response) return SendClientMessage(playerid, 0xFF330000, "You did not buy a gun! Visit again anytime soon!");
- switch(listitem) {
- case 0:
- {
- if(GetPlayerMoney(playerid) >= 2000)
- {
- GivePlayerWeapon(playerid, 29, 500);
- GivePlayerMoney(playerid, -2000);
- SendClientMessage(playerid, 0x00B300FF, "Weapon bought!");
- return 1;
- }
- else return SendClientMessage(playerid, 0x0000002B, "Not enough money!");
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) >= 1900)
- {
- GivePlayerWeapon(playerid, 28, 500);
- GivePlayerMoney(playerid, -1900);
- SendClientMessage(playerid, 0x00B300FF, "Weapon bought!");
- return 1;
- }
- else return SendClientMessage(playerid, 0x0000002B, "Not enough money!");
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) >= 1900)
- {
- GivePlayerWeapon(playerid, 32, 500);
- GivePlayerMoney(playerid, -1900);
- SendClientMessage(playerid, 0x00B300FF, "Weapon bought!");
- return 1;
- }
- else return SendClientMessage(playerid, 0x0000002B, "Not enough money!");
- }
- }
- }
- }
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement