Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <zcmd>
- #include <streamer>
- //STWeapon sys by stuun V1.2
- COMMAND:weaponshop(playerid, params[])
- {
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Weapon shop", "{ff0000}Deagle {00CC00}$2000\n{FF0000}Shotgun {00CC00}$1000\n{FF0000}Sniper {00CC00}$3000\n{FF0000}M4 {00CC00}$5000\n{FF0000}MP5 {00CC00}$1000\n{FF0000}Combat {00CC00}$6000\n{FF0000}Grenade {00CC00}$6000\n{FF0000}Tec9 {00CC00}$4000\n{ff0000}Slilenced pistol {00CC00}$1000\n{ff0000}AK-47 {00CC00}$5000", "Purchase", "Exit");
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(response)
- {
- switch(1)
- {
- case 1:
- {
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid, -1, "{FF0000}[ERROR]: You don't have enough cash.");
- GivePlayerMoney(playerid, -2000);
- SendClientMessage(playerid, -1, "{FFCC66}[SHOP] {00CC00}You have bought deagle.");
- GivePlayerWeapon(playerid, 24, 100);
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, -1, "{FF0000}[ERROR]: You don't have enough cash.");
- GivePlayerMoney(playerid, -1000);
- GivePlayerWeapon(playerid, 25, 200);
- SendClientMessage(playerid, -1, "{FFCC66}[SHOP] {00CC00}You have bought shotgun.");
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) < 3000) return SendClientMessage(playerid, -1, "{FF0000}[ERROR]: You don't have enough cash.");
- GivePlayerMoney(playerid, -3000);
- GivePlayerWeapon(playerid, 34, 200);
- SendClientMessage(playerid, -1, "{FFCC66}[SHOP] {00CC00}You have bought Sniper");
- }
- case 3:
- {
- if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, -1, "{FF0000}[ERROR]: You don't have enough cash.");
- GivePlayerMoney(playerid, -5000);
- GivePlayerWeapon(playerid, 31, 200);
- SendClientMessage(playerid, -1, "{FFCC66}[SHOP] {00CC00}You have bought m4.");
- }
- case 4:
- {
- if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, -1, "{FF0000}[ERROR]: You don't have enough cash.");
- GivePlayerMoney(playerid, -1000);
- GivePlayerWeapon(playerid, 32, 200);
- SendClientMessage(playerid, -1, "{FFCC66}[SHOP] {00CC00}You have bought mp5");
- }
- case 5:
- {
- if(GetPlayerMoney(playerid) < 6000) return SendClientMessage(playerid, -1, "{FF0000}[ERROR]: You don't have enough cash.");
- GivePlayerMoney(playerid, -6000);
- GivePlayerWeapon(playerid, 27, 200);
- SendClientMessage(playerid, -1, "{FFCC66}[SHOP] {00CC00}You have bought shotgun.");
- }
- case 6:
- {
- if(GetPlayerMoney(playerid) < 6000) return SendClientMessage(playerid, -1, "{FF0000}[ERROR]: You don't have enough cash.");
- GivePlayerMoney(playerid, -6000);
- GivePlayerWeapon(playerid, 16, 200);
- SendClientMessage(playerid, -1, "{FFCC66}[SHOP] {00CC00}You have bought grenade");
- }
- case 7:
- {
- if(GetPlayerMoney(playerid) < 4000) return SendClientMessage(playerid, -1, "{FF0000}[ERROR]: You don't have enough cash.");
- GivePlayerMoney(playerid, -4000);
- GivePlayerWeapon(playerid, 32, 200);
- SendClientMessage(playerid, -1, "{FFCC66}[SHOP] {00CC00}You have bought tec-9.");
- }
- case 8:
- {
- if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, -1, "{FF0000}[ERROR]: You don't have enough cash.");
- GivePlayerMoney(playerid, -1000);
- GivePlayerWeapon(playerid, 23, 200);
- SendClientMessage(playerid, -1, "{FFCC66}[SHOP] {00CC00}You have bought tec-9.slienced pistol");
- }
- case 9:
- {
- if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, -1, "{FF0000}[ERROR]: You don't have enough cash.");
- GivePlayerMoney(playerid, -5000);
- GivePlayerWeapon(playerid, 30, 200);
- SendClientMessage(playerid, -1, "{FFCC66}[SHOP] {00CC00}You have bought AK-47");
- }
- }
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement