Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*CRÉDITOS: ZCMD: Zeex; A_SAMP: EQUIP SA-MP
- PICKUP: http://weedarr.wikidot.com/
- CORES: http://www.mxstudio.com.br/Conteudos/Dreamweaver/Cores.htm
- AJUDA: JonathanFeitosa(tutorial de como usar dialog)
- iCasTiel(por corrigir um erro cometido por minha pessoa)
- Dolby(mostrando um pequeno erro cometido por minha pessoa)*/
- //includes
- #include < a_samp >
- #include < zcmd >
- //defines
- #define COR_VERMELHOESCURO 0x8B0000
- #define COR_VERDEESCURO 0x008B00
- #define DIALOG_MENU_DE_ARMAS 0
- #define DIALOG_ARMAS_BRANCAS 1
- #define DIALOG_PISTOLAS 2
- #define DIALOG_ESCOPETAS 3
- #define DIALOG_SUB_METRALHADORAS 4
- #define DIALOG_RIFLES_DE_ALTO_CALIBRE 5
- #define DIALOG_SNIPER 6
- #define DIALOG_BOMBAS 7
- #define DIALOG_UTILITARIOS 8
- //new's
- new pickup_ammunation[5];
- //publics
- public OnFilterScriptInit()
- {
- pickup_ammunation[1] = CreatePickup(1239, 0, 1368.3351,-1279.8118,13.5469, -1); //entrada
- pickup_ammunation[2] = CreatePickup(1239, 0, 285.4391,-41.4983,1001.5156, -1); //sair
- pickup_ammunation[3] = CreatePickup(1239, 0, 295.8998,-38.5147,1001.5156, -1); //comprar arma
- return true;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- return SendClientMessage(playerid, COR_VERMELHOESCURO, "[ERRO] O comando digitado é inválido e/ou não existe.");
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_MENU_DE_ARMAS)
- {
- if(response)
- {
- if(listitem == 0)
- {
- ShowPlayerDialog(dialogid, DIALOG_ARMAS_BRANCAS, DIALOG_STYLE_LIST, "Armas brancas", "Soco inglês/t$100,00/nFaca/t$50,00/nTaco de Baaseball/t$75,00", "Comprar", "Voltar");
- }
- if(listitem == 1)
- {
- ShowPlayerDialog(dialogid, DIALOG_PISTOLAS, DIALOG_STYLE_LIST, "Pistolas", "9mm sem silenciador/t$1.500,00/n9mm com silenciador/t$2.000,00/nDesert Eagle/t$3.500,00", "Comprar", "Voltar");
- }
- if(listitem == 2)
- {
- ShowPlayerDialog(dialogid, DIALOG_ESCOPETAS, DIALOG_STYLE_LIST, "Escopetas", "Escopeta calibre 12/t$5.000,00/nCombat Shotgun/t$4.000,00/nEscopeta de cano cerrado/t$4.500,00", "Comprar", "Voltar");
- }
- if(listitem == 3)
- {
- ShowPlayerDialog(dialogid, DIALOG_SUB_METRALHADORAS, DIALOG_STYLE_LIST, "Sub-Metralhadoras", "TEC-9/t$3.500,00/nMP-5/t$4.500,00/nMicro SMG/Uzi/t$3.500,00", "Comprar", "Voltar");
- }
- if(listitem == 4)
- {
- ShowPlayerDialog(dialogid, DIALOG_RIFLES_DE_ALTO_CALIBRE, DIALOG_STYLE_LIST, "Rifles de alto-calibre", "AK-47/t$7.000,00/nM4A1/t$6.500,00/n", "Comprar", "Voltar");
- }
- if(listitem == 5)
- {
- ShowPlayerDialog(dialogid, DIALOG_SNIPER, DIALOG_STYLE_LIST, "Sniper", "Sniper Rifle/t$6.000,00/nCountry Rifle/t$6.500,00/n", "Comprar", "Voltar");
- }
- if(listitem == 6)
- {
- ShowPlayerDialog(dialogid, DIALOG_BOMBAS, DIALOG_STYLE_LIST, "Bombas", "Granada/t$1.000,00/nBomba de lacrimogêneo/t$750,00/nMolotov Cocktail/t$1.500,00", "Comprar", "Voltar");
- }
- if(listitem == 7)
- {
- ShowPlayerDialog(dialogid, DIALOG_UTILITARIOS, DIALOG_STYLE_LIST, "Utilitários", "Spray/t$150,00/nCamêra/t$100,00/nPara-quedas/t$200,00/nThermal Goggles/t$200,00/nNight Vis Goggles/t$200,00/n", "Comprar", "Voltar");
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_ARMAS_BRANCAS)
- {
- if(response)
- {
- if(listitem == 0)
- {
- if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, COR_VERMELHOESCURO, "[ERRO]: Você não possuí dinheiro suficiente para efetuar a compra.");
- GivePlayerWeapon(playerid, 1, 1);
- GivePlayerMoney(playerid, -100); return SendClientMessage(playerid, COR_VERDEESCURO, "[PARABÉNS]: Você acaba de comprar um soco inglês!");
- }
- if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, COR_VERMELHOESCURO, "[ERRO]: Você não possuí dinheiro suficiente para efetuar a compra.");
- GivePlayerWeapon(playerid, 4, 1);
- GivePlayerMoney(playerid, -50); return SendClientMessage(playerid, COR_VERDEESCURO, "[PARABÉNS]: Você acaba de comprar uma faca!");
- }
- if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) < 75) return SendClientMessage(playerid, COR_VERMELHOESCURO, "[ERRO]: Você não possuí dinheiro suficiente para efetuar a compra.");
- GivePlayerWeapon(playerid, 5, 1);
- GivePlayerMoney(playerid, -75); return SendClientMessage(playerid, COR_VERDEESCURO, "[PARABÉNS]: Você acaba de comprar um taco de baseball!");
- }
- if(listitem == 4)
- {
- ShowPlayerDialog(playerid, DIALOG_MENU_DE_ARMAS, DIALOG_STYLE_LIST, "Menu de armas", "Armas branca/nPistolas/nEscopetas/nSub-Metralhadoras/nRifles de alto-calibre/nSnipers/nBombas/nUtilitários", "Abrir", "Sair");
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_PISTOLAS)
- {
- if(response)
- {
- if(listitem == 0)
- {
- if(GetPlayerMoney(playerid) < 1500) return SendClientMessage(playerid, COR_VERMELHOESCURO, "[ERRO]: Você não possui dinheiro suficiente para efetuar a compra.");
- GivePlayerWeapon(playerid, 22, 100);
- GivePlayerMoney(playerid, -1500); return SendClientMessage(playerid, COR_VERDEESCURO, "[PARABÉNS]: Você acaba de comprar uma 9mm sem silenciador!");
- }
- if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid, COR_VERMELHOESCURO, "[ERRO]: Você não possui dinheiro suficiente para efetuar a compra.");
- GivePlayerWeapon(playerid, 23, 100);
- GivePlayerMoney(playerid, -2000); return SendClientMessage(playerid, COR_VERDEESCURO, "[PARABÉNS]: Você acaba de comprar uma 9mm com silenciador!");
- }
- if(listitem == 2)
- {
- if(GetPlayerMoney(playerid) < 3500) return SendClientMessage(playerid, COR_VERMELHOESCURO, "[ERRO]: Você não possui dinheiro suficiente para efetuar a compra.");
- GivePlayerWeapon(playerid, 24, 77);
- GivePlayerMoney(playerid, -3500); return SendClientMessage(playerid, COR_VERDEESCURO, "[PARABÉNS]: Você acaba de comprar uma Desert Eagle!");
- }
- if(listitem == 4)
- {
- ShowPlayerDialog(playerid, DIALOG_MENU_DE_ARMAS, DIALOG_STYLE_LIST, "Menu de armas", "Armas branca/nPistolas/nEscopetas/nSub-Metralhadoras/nRifles de alto-calibre/nSnipers/nBombas/nUtilitários", "Abrir", "Sair");
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_ESCOPETAS)
- {
- if(response)
- {
- if(listitem == 0)
- {
- if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, COR_VERMELHOESCURO, "[ERRO]: Você não possui dinheiro suficiente para efetuar a compra.");
- GivePlayerWeapon(playerid, 25, 110);
- GivePlayerMoney(playerid, -5000); return SendClientMessage(playerid, COR_VERDEESCURO, "[PARABÉNS]: Você acaba de comprar uma Escopeta calibre .12!");
- }
- if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) < 4000) return SendClientMessage(playerid, COR_VERMELHOESCURO, "[ERRO]: Você não possui dinheiro suficiente para efetuar a compra.");
- GivePlayerWeapon(playerid, 27, 110);
- GivePlayerMoney(playerid, -4000); return SendClientMessage(playerid, COR_VERMELHOESCURO, "[PARABÉNS]: Você acaba de comprar uma Combat Shotgun!");
- }
- if(listitem == 2)
- {
- if(GetPlayerMoney(playerid) < 4500) return SendClientMessage(playerid, COR_VERMELHOESCURO, "[ERRO]: Você não possui dinheiro suficiente para efetuar a compra.");
- GivePlayerWeapon(playerid, 26, 44);
- GivePlayerMoney(playerid, -4500); return SendClientMessage(playerid, COR_VERDEESCURO, "[PARABÉNS]: Você acaba de comprar uma Escopeta de cano serrado!");
- }
- if(listitem == 4)
- {
- ShowPlayerDialog(playerid, DIALOG_MENU_DE_ARMAS, DIALOG_STYLE_LIST, "Menu de armas", "Armas branca/nPistolas/nEscopetas/nSub-Metralhadoras/nRifles de alto-calibre/nSnipers/nBombas/nUtilitários", "Abrir", "Sair");
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_SUB_METRALHADORAS)
- {
- if(response)
- {
- if(listitem == 0)
- {
- if(GetPlayerMoney(playerid) < 3500) return SendClientMessage(playerid, COR_VERMELHOESCURO, "[ERRO]: Você não possui dinheiro suficiente para efetuar a compra.");
- GivePlayerWeapon(playerid, 32, 550);
- GivePlayerMoney(playerid, -3500); return SendClientMessage(playerid, COR_VERDEESCURO, "[PARABÉNS]: Você acaba de comprar uma TEC-9!");
- }
- if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) < 4500) return SendClientMessage(playerid, COR_VERMELHOESCURO, "[ERRO]: Você não possui dinheiro suficiente para efetuar a compra.");
- GivePlayerWeapon(playerid, 29, 330);
- GivePlayerMoney(playerid, -4500); return SendClientMessage(playerid, COR_VERDEESCURO, "[PARABÉNS]: Você acaba de comprar uma MP-5!");
- }
- if(listitem == 2)
- {
- if(GetPlayerMoney(playerid) < 3500) return SendClientMessage(playerid, COR_VERMELHOESCURO, "[ERRO]: Você não possui dinheiro suficiente para efetuar a compra.");
- GivePlayerWeapon(playerid, 28, 550);
- GivePlayerMoney(playerid, -3500); return SendClientMessage(playerid, COR_VERDEESCURO, "[PARABÉNS]: Você acaba de comprar uma Micro SMG/Uzi");
- }
- if(listitem == 3)
- {
- ShowPlayerDialog(playerid, DIALOG_MENU_DE_ARMAS, DIALOG_STYLE_LIST, "Menu de armas", "Armas branca/nPistolas/nEscopetas/nSub-Metralhadoras/nRifles de alto-calibre/nSnipers/nBombas/nUtilitários", "Abrir", "Sair");
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_RIFLES_DE_ALTO_CALIBRE)
- {
- if (response)
- {
- if (listitem == 0)
- {
- if(GetPlayerMoney(playerid) < 7000) return SendClientMessage(playerid, COR_VERMELHOESCURO, "[ERRO]: Você não possui dinheiro suficiente para efetuar a compra.");
- GivePlayerWeapon(playerid, 30, 330);
- GivePlayerMoney(playerid, -7000); return SendClientMessage(playerid, COR_VERDEESCURO, "[PARABÉNS]: Você acaba de comprar uma AK-47");
- }
- if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) < 6500) return SendClientMessage(playerid, COR_VERMELHOESCURO, "[ERRO]: Você não possui dinheiro suficiente para efetuar a compra.");
- GivePlayerWeapon(playerid, 31, 550);
- GivePlayerMoney(playerid, -6500); return SendClientMessage(playerid, COR_VERDEESCURO, "[PARABÉNS]: Você acaba de comprar uma M4A1");
- }
- if(listitem == 2)
- {
- ShowPlayerDialog(playerid, DIALOG_MENU_DE_ARMAS, DIALOG_STYLE_LIST, "Menu de armas", "Armas branca/nPistolas/nEscopetas/nSub-Metralhadoras/nRifles de alto-calibre/nSnipers/nBombas/nUtilitários", "Abrir", "Sair");
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_SNIPER)
- {
- if(response)
- {
- if(listitem == 0)
- {
- if(GetPlayerMoney(playerid) < 6000) return SendClientMessage(playerid, COR_VERMELHOESCURO, "[ERRO]: Você não possui dinheiro suficiente para efetuar a compra.");
- GivePlayerWeapon(playerid, 34, 100);
- GivePlayerMoney(playerid, -6000); return SendClientMessage(playerid, COR_VERDEESCURO, "[PARABÉNS]: Você acaba de comprar um Rifle Sniper!");
- }
- if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) < 6500) return SendClientMessage(playerid, COR_VERMELHOESCURO, "[ERRO]: Você não possui dinheiro suficiente para efetuar a compra.");
- GivePlayerWeapon(playerid, 33, 550);
- GivePlayerMoney(playerid, -6500); return SendClientMessage(playerid, COR_VERDEESCURO, "[PARABÉNS]: Você acaba de comprar um Rifle de caça!");
- }
- if(listitem == 2)
- {
- ShowPlayerDialog(playerid, DIALOG_MENU_DE_ARMAS, DIALOG_STYLE_LIST, "Menu de armas", "Armas branca/nPistolas/nEscopetas/nSub-Metralhadoras/nRifles de alto-calibre/nSnipers/nBombas/nUtilitários", "Abrir", "Sair");
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_BOMBAS)
- {
- if(response)
- {
- if(listitem == 0)
- {
- if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, COR_VERMELHOESCURO, "[ERRO]: Você não possui dinheiro suficiente para efetuar a compra.");
- GivePlayerWeapon(playerid, 16, 10);
- GivePlayerMoney(playerid, -1000); return SendClientMessage(playerid, COR_VERDEESCURO, "[PARABÉNS]: Você acaba de comprar uma Granada!");
- }
- if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) < 750) return SendClientMessage(playerid, COR_VERMELHOESCURO, "[ERRO]: Você não possui dinheiro suficiente para efetuar a compra.");
- GivePlayerWeapon(playerid, 17, 10);
- GivePlayerMoney(playerid, -750); return SendClientMessage(playerid, COR_VERDEESCURO, "[PARABÉNS]: Você acaba de comprar uma bomba de lacrimogêneo!");
- }
- if(listitem == 2)
- {
- if(GetPlayerMoney(playerid) < 1500) return SendClientMessage(playerid, COR_VERMELHOESCURO, "[ERRO]: Você não possui dinheiro suficiente para efetuar a compra.");
- GivePlayerWeapon(playerid, 18, 10);
- GivePlayerMoney(playerid, -1500); return SendClientMessage(playerid, COR_VERDEESCURO, "[PARABÉNS]: Você acaba de comprar um Molotov Cocktail!");
- }
- if(listitem == 3)
- {
- ShowPlayerDialog(playerid, DIALOG_MENU_DE_ARMAS, DIALOG_STYLE_LIST, "Menu de armas", "Armas branca/nPistolas/nEscopetas/nSub-Metralhadoras/nRifles de alto-calibre/nSnipers/nBombas/nUtilitários", "Abrir", "Sair");
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_UTILITARIOS)
- {
- if(response)
- {
- if(listitem == 0)
- {
- if(GetPlayerMoney(playerid) < 150) return SendClientMessage(playerid, COR_VERMELHOESCURO, "[ERRO]: Você não possui dinheiro suficiente para efetuar a compra.");
- GivePlayerWeapon(playerid, 41, 500);
- GivePlayerMoney(playerid, -150); return SendClientMessage(playerid, COR_VERDEESCURO, "[PARABÉNS]: Você acaba de comprar um Spray!");
- }
- if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, COR_VERMELHOESCURO, "[ERRO]: Você não possui dinheiro suficiente para efetuar a compra.");
- GivePlayerWeapon(playerid, 43, 100);
- GivePlayerMoney(playerid, -100); return SendClientMessage(playerid, COR_VERDEESCURO, "[PARABÉNS]: Você acaba de comprar uma Camêra!");
- }
- if(listitem == 2)
- {
- if(GetPlayerMoney(playerid) < 200) return SendClientMessage(playerid, COR_VERMELHOESCURO, "[ERRO]: Você não possui dinheiro suficiente para efetuar a compra.");
- GivePlayerWeapon(playerid, 46, 1);
- GivePlayerMoney(playerid, -200); return SendClientMessage(playerid, COR_VERDEESCURO, "[PARABÉNS]: Você acaba de comprar um Para-querdas!");
- }
- if(listitem == 3)
- {
- if(GetPlayerMoney(playerid) < 200) return SendClientMessage(playerid, COR_VERMELHOESCURO, "[ERRO]: Você não possui dinheiro suficiente para efetuar a compra.");
- GivePlayerWeapon(playerid, 45, 1);
- GivePlayerMoney(playerid, -200); return SendClientMessage(playerid, COR_VERDEESCURO, "[PARABÉNS]: Você acaba de comprar um Thermal Goggles!");
- }
- if(listitem == 4)
- {
- if(GetPlayerMoney(playerid) < 200) return SendClientMessage(playerid, COR_VERMELHOESCURO, "[ERRO]: Você não possui dinheiro suficiente para efetuar a compra.");
- GivePlayerWeapon(playerid, 44, 1);
- GivePlayerMoney(playerid, -200); return SendClientMessage(playerid, COR_VERDEESCURO, "[PARABÉNS]: Você acaba de comprar um Night Vis Goggles!");
- }
- if(listitem == 5)
- {
- ShowPlayerDialog(playerid, DIALOG_MENU_DE_ARMAS, DIALOG_STYLE_LIST, "Menu de armas", "Armas branca/nPistolas/nEscopetas/nSub-Metralhadoras/nRifles de alto-calibre/nSnipers/nBombas/nUtilitários", "Abrir", "Sair");
- }
- }
- }
- return 1;
- }
- //comandos
- COMMAND:entrar(playerid, params[])
- {
- if(IsPlayerInRangeOfPoint(playerid, 1.0, 1368.3351,-1279.8118,13.5469))
- {
- SetPlayerInterior(playerid, 1);
- SetPlayerPos(playerid, 285.4391,-41.4983,1001.5156);
- }
- return 1;
- }
- COMMAND:sair(playerid, params[])
- {
- if(IsPlayerInRangeOfPoint(playerid, 1.0, 285.4391,-41.4983,1001.5156))
- {
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, 1368.3351,-1279.8118,13.5469);
- }
- return 1;
- }
- COMMAND:comprararma(playerid, params[])
- {
- if(IsPlayerInRangeOfPoint(playerid, 1.0, 295.8998,-38.5147,1001.5156))
- {
- ShowPlayerDialog(playerid, DIALOG_MENU_DE_ARMAS, DIALOG_STYLE_LIST, "Menu de armas", "Armas branca/nPistolas/nEscopetas/nSub-Metralhadoras/nRifles de alto-calibre/nSnipers/nBombas/nUtilitários", "Abrir", "Sair");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement