Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define FILTERSCRIPT
- #include <a_samp>
- #include <zcmd>
- #define COLOR_GRAD2 0xBFC0C2FF
- #define COLOR_GRAD4 0xD8D8D8FF
- #define COLOR_RED 0xAA3333AA
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Ammu-Nation Buyable Made By Adrian Myrick");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- IsAtAmmu(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- if(IsPlayerInRangeOfPoint(playerid, 50.0, 2539, -133.7294, 999.6016))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 50.0, 295.1320, -38.5151, 1001.5156))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 50.0, 296.919982, -108.071998, 1001.515625))
- {
- return 1;
- }
- }
- return 0;
- }
- CMD:buygun(playerid, params[])
- {
- if(!IsAtAmmu(playerid))
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You are not in a Ammunation Shop");
- return 1;
- }
- else
- {
- ShowPlayerDialog(playerid, 30001, DIALOG_STYLE_LIST, "Ammunation Shop", "Shotgun (5000)\nMp5 (20000)\nDeagle (35000)\nM4 (75000)\nFullVest (3000)", "Buy", "Cancel");
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- new string[2000];
- if(dialogid == 30001)
- {
- if(response)
- {
- if(listitem == 0)
- {
- if (GetPlayerMoney(playerid) >= 5000)
- {
- GivePlayerMoney(playerid, -5000);
- GivePlayerWeapon(playerid, 25, 60000);
- format(string, sizeof(string), "Pumped Shotgun Purchase.");
- SendClientMessage(playerid, COLOR_RED, string);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD4, "You don't have the cash for this item!");
- }
- }
- if(listitem == 1)
- {
- if (GetPlayerMoney(playerid) >= 20000)
- {
- GivePlayerMoney(playerid, -20000);
- GivePlayerWeapon(playerid, 29, 60000);
- format(string, sizeof(string), "Mp5 Purchase");
- SendClientMessage(playerid, COLOR_RED, string);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD4, "You don't have the cash for this item!");
- }
- }
- if(listitem == 2)
- {
- if (GetPlayerMoney(playerid) >= 35000)
- {
- GivePlayerMoney(playerid, -35000);
- GivePlayerWeapon(playerid, 24, 60000);
- format(string, sizeof(string), "Deagle Purchase");
- SendClientMessage(playerid, COLOR_RED, string);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD4, "You don't have the cash for this item!");
- }
- }
- if(listitem == 3)
- {
- if (GetPlayerMoney(playerid) >= 75000)
- {
- GivePlayerMoney(playerid, -75000);
- GivePlayerWeapon(playerid, 31, 60000);
- format(string, sizeof(string), "M4 Purchase");
- SendClientMessage(playerid, COLOR_RED, string);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD4, "You don't have the cash for this item!");
- }
- }
- if(listitem == 4)
- {
- if (GetPlayerMoney(playerid) >= 3000)
- {
- GivePlayerMoney(playerid, -3000);
- SetPlayerArmour(playerid, 100);
- format(string, sizeof(string), "KevlarVest Purchase");
- SendClientMessage(playerid, COLOR_RED, string);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD4, "You don't have the cash for this item!");
- }
- }
- }
- }
- return 1;
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment