Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*VISITE NOSSO SITE: http://www.sampknd.com/
- SAMP KND MELHOR BLOG DE SAMP DO BRASIL
- */
- #include <a_samp>
- #include <cpstream>
- #if defined FILTERSCRIPT
- #define Comidas 1
- public OnFilterScriptInit()
- {
- print("|------------------------------------------|");
- print("| Restaurante Absolut Iniciado com Sucesso.|");
- print("|------------------------------------------|");
- print("| Carregando Objetos Do Restaurante ... |");
- print("| Objetos Carregados Com Sucesso . |");
- print("|------------------------------------------|");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("|---------------------------------------------|");
- print("| Restaurante Absolut Desligado com Sucesso. |");
- print("|---------------------------------------------|");
- print("| Descarregando Objetos Do Restaurante ... |");
- print("| Objetos Descarregados Com Sucesso . |");
- print("|---------------------------------------------|");
- }
- #endif
- public OnGameModeInit()
- {
- AddStaticPickup(1318, 2, 1827.2057,-1393.1920,13.4259, 0);
- AddStaticPickup(1241, 2, 450.6672,-84.7247,999.5547, 0);
- AddStaticPickup(1318, 2, 459.4602,-88.7886,999.5547, 0);
- Create3DTextLabel("{FFFFFF}Restaurante Absolut\nAperte 'ENTER' para usar",0xFFFFFF, 450.6672,-84.7247,999.5547, 10.0,0);
- Create3DTextLabel("{FFFFFF}Restaurante Absolut\nAperte 'ENTER' para entrar",0xFFFFFF, 1827.2057,-1393.1920,13.4259, 10.0,0);
- Create3DTextLabel("{FFFFFF}Restaurante Absolut\nAperte 'ENTER' para sair",0xFFFFFF, 459.4602,-88.7886,999.5547, 10.0,0);
- CreateObject(18239,1822.19995117,-1399.90002441,12.39999962,0.00000000,0.00000000,180.00000000);
- CreateObject(643,1830.50000000,-1402.90002441,12.89999962,0.00000000,0.00000000,0.00000000);
- CreateObject(1432,1833.80004883,-1399.59997559,12.39999962,0.00000000,0.00000000,0.00000000);
- CreateObject(1969,1834.80004883,-1404.80004883,12.89999962,0.00000000,0.00000000,0.00000000);
- CreateObject(1969,1834.80004883,-1403.90002441,12.89999962,0.00000000,0.00000000,0.00000000);
- CreateObject(1486,1833.90002441,-1399.50000000,13.19999981,0.00000000,0.00000000,0.00000000);
- CreateObject(987,1817.80004883,-1406.50000000,12.30000019,0.00000000,0.00000000,176.00000000);
- CreateObject(1412,1836.69995117,-1403.80004883,13.69999981,0.00000000,0.00000000,269.99996948);
- CreateObject(1412,1836.69995117,-1398.59997559,13.69999981,0.00000000,0.00000000,269.99450684);
- CreateObject(1412,1836.90002441,-1390.19995117,13.89999962,0.00000000,0.00000000,269.99450684);
- CreateObject(3475,1811.09997559,-1387.50000000,15.00000000,0.00000000,0.00000000,90.00000000);
- CreateObject(3475,1816.90002441,-1387.50000000,15.00000000,0.00000000,0.00000000,90.00000000);
- CreateObject(3475,1822.80004883,-1387.50000000,15.00000000,0.00000000,0.00000000,90.00000000);
- CreateObject(3475,1828.50000000,-1387.50000000,15.00000000,0.00000000,0.00000000,90.00000000);
- CreateObject(3550,1833.80004883,-1388.09997559,13.30000019,0.00000000,2.00000000,269.99996948);
- CreateObject(1594,1815.19995117,-1403.30004883,12.89999962,0.00000000,0.00000000,0.00000000);
- CreateObject(1968,1815.19995117,-1399.30004883,12.89999962,0.00000000,0.00000000,0.00000000);
- CreateObject(1432,1810.69995117,-1402.00000000,12.39999962,0.00000000,0.00000000,0.00000000);
- CreateObject(1825,1810.90002441,-1395.30004883,12.39999962,0.00000000,0.00000000,0.00000000);
- CreateObject(1970,1810.30004883,-1389.40002441,13.19999981,0.00000000,0.00000000,0.00000000);
- CreateObject(1970,1814.09997559,-1389.40002441,13.19999981,0.00000000,0.00000000,0.00000000);
- CreateObject(1970,1817.90002441,-1389.40002441,13.19999981,0.00000000,0.00000000,0.00000000);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- SetPlayerMapIcon(playerid, 1,1827.2057,-1393.1920,13.4259, 50, 0xE6E6E6E6);
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp(cmdtext, "/entrar", true) == 0)
- {
- if (PlayerToPoint(3.0, playerid,1827.2057,-1393.1920,13.4259))
- {
- SetPlayerPos(playerid, 457.304748,-88.428497,999.554687);
- GameTextForPlayer(playerid, "~w~Restaurante",5000,1);
- SetPlayerInterior(playerid,4);
- SetPlayerFacingAngle(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- }
- else if (PlayerToPoint(3.0, playerid, 457.304748,-88.428497,999.554687))
- {
- SetPlayerPos(playerid, 1827.2057,-1393.1920,13.4259);
- SetPlayerInterior(playerid,0);
- SetPlayerFacingAngle(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- }
- }
- if (strcmp(cmdtext, "/cardapio", true) == 0)
- {
- if(PlayerToPoint(10.0,playerid, 450.6672,-84.7247,999.5547))
- {
- ShowPlayerDialog(playerid, 6656 ,DIALOG_STYLE_LIST,"Cardápio Absolut","- Arroz Com Feijão \t{00EE76}R$150\n- Macarronada\t{00EE76}R$200\n- Marmitex\t{00EE76}R$120\n- Salmão Grelhado\t{00EE76}R$200\n- Bacalhau\t{00EE76}R$210\n- Bífe a Portuguesa\t{00EE76}R$250\n- Costeletas\t{00EE76}R$120\n- Lombetas de Porco\t{00EE76}R$170\n- Lasanha\t{00EE76}R$500\n\n","Aceitar","Cancelar");
- return 1;
- }
- }
- return 0;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(newkeys == 16 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
- {
- OnPlayerCommandText(playerid,"/entrar");
- OnPlayerCommandText(playerid,"/cardapio");
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == 6656)
- {
- new Float:health;
- TogglePlayerControllable(playerid, 0);
- if(!response) { return 1; }
- switch(listitem)
- {
- case 0://Arroz
- {
- if(GetPlayerMoney(playerid) < 150) return SendClientMessage(playerid, 0xF68E00F6,"{FF0000}[ERRO] {FFFFFF}Você não tem R$150 para comprar!");
- ApplyAnimation(playerid,"FOOD","EAT_Pizza",4.1,0,1,1,1,1);
- GivePlayerMoney(playerid, 150);
- TogglePlayerControllable(playerid, 1);
- SendClientMessage(playerid, 0xFFFFFF ,"[INFO] Você acabou de comprar um prato 'Arroz Com Feijão'");
- SetPlayerHealth(playerid, health + 10.0);
- }
- case 1://Macarronada
- {
- if(GetPlayerMoney(playerid) < 200) return SendClientMessage(playerid, 0xF68E00F6,"{FF0000}[ERRO] {FFFFFF}Você não tem R$200 para comprar!");
- ApplyAnimation(playerid,"FOOD","EAT_Pizza",4.1,0,1,1,1,1);
- GivePlayerMoney(playerid, 200);
- TogglePlayerControllable(playerid, 1);
- SendClientMessage(playerid, 0xFFFFFF ,"[INFO] Você acabou de comprar um prato 'Macarronada'");
- SetPlayerHealth(playerid, health + 10.0);
- }
- case 2://Marmitex
- {
- if(GetPlayerMoney(playerid) < 120) return SendClientMessage(playerid, 0xF68E00F6,"{FF0000}[ERRO] {FFFFFF}Você não tem R$120 para comprar!");
- ApplyAnimation(playerid,"FOOD","EAT_Pizza",4.1,0,1,1,1,1);
- GivePlayerMoney(playerid, 120);
- TogglePlayerControllable(playerid, 1);
- SendClientMessage(playerid, 0xFFFFFF ,"[INFO] Você acabou de comprar um prato 'Marmitéx'");
- SetPlayerHealth(playerid, health + 20.0);
- }
- case 3://Salmão Grelhado
- {
- if(GetPlayerMoney(playerid) < 120) return SendClientMessage(playerid, 0xF68E00F6,"{FF0000}[ERRO] {FFFFFF}Você não tem R$200 para comprar!");
- ApplyAnimation(playerid,"FOOD","EAT_Pizza",4.1,0,1,1,1,1);
- GivePlayerMoney(playerid, 200);
- TogglePlayerControllable(playerid, 1);
- SendClientMessage(playerid, 0xFFFFFF ,"[INFO] Você acabou de comprar um prato 'Salmão Grelhado'");
- SetPlayerHealth(playerid, health + 50.0);
- }
- case 4://Bacalhau
- {
- if(GetPlayerMoney(playerid) < 120) return SendClientMessage(playerid, 0xF68E00F6,"{FF0000}[ERRO] {FFFFFF}Você não tem R$210 para comprar!");
- ApplyAnimation(playerid,"FOOD","EAT_Pizza",4.1,0,1,1,1,1);
- GivePlayerMoney(playerid, 210);
- TogglePlayerControllable(playerid, 1);
- SendClientMessage(playerid, 0xFFFFFF ,"[INFO] Você acabou de comprar um prato 'Bacalhau'");
- SetPlayerHealth(playerid, health + 70.0);
- }
- case 5://Bife à Portuguesa
- {
- if(GetPlayerMoney(playerid) < 120) return SendClientMessage(playerid, 0xF68E00F6,"{FF0000}[ERRO] {FFFFFF}Você não tem R$250 para comprar!");
- ApplyAnimation(playerid,"FOOD","EAT_Pizza",4.1,0,1,1,1,1);
- GivePlayerMoney(playerid, 250);
- TogglePlayerControllable(playerid, 1);
- SendClientMessage(playerid, 0xFFFFFF ,"[INFO] Você acabou de comprar um prato 'Bife à Portuguesa'");
- SetPlayerHealth(playerid, health + 60.0);
- }
- case 6://Costeletas
- {
- if(GetPlayerMoney(playerid) < 120) return SendClientMessage(playerid, 0xF68E00F6,"{FF0000}[ERRO] {FFFFFF}Você não tem R$120 para comprar!");
- ApplyAnimation(playerid,"FOOD","EAT_Pizza",4.1,0,1,1,1,1);
- GivePlayerMoney(playerid, 120);
- TogglePlayerControllable(playerid, 1);
- SendClientMessage(playerid, 0xFFFFFF ,"[INFO] Você acabou de comprar um prato 'Costeletas'");
- SetPlayerHealth(playerid, health + 70.0);
- }
- case 7://Lombeta de Porco
- {
- if(GetPlayerMoney(playerid) < 120) return SendClientMessage(playerid, 0xF68E00F6,"{FF0000}[ERRO] {FFFFFF}Você não tem R$170 para comprar!");
- ApplyAnimation(playerid,"FOOD","EAT_Pizza",4.1,0,1,1,1,1);
- GivePlayerMoney(playerid, 170);
- TogglePlayerControllable(playerid, 1);
- SendClientMessage(playerid, 0xFFFFFF ,"[INFO] Você acabou de comprar um prato 'Lombeta de Porco'");
- SetPlayerHealth(playerid, health + 80.0);
- }
- case 8://Lasanha
- {
- if(GetPlayerMoney(playerid) < 120) return SendClientMessage(playerid, 0xF68E00F6,"{FF0000}[ERRO] {FFFFFF}Você não tem R$500 para comprar!");
- ApplyAnimation(playerid,"FOOD","EAT_Pizza",4.1,0,1,1,1,1);
- GivePlayerMoney(playerid, 500);
- TogglePlayerControllable(playerid, 1);
- SendClientMessage(playerid, 0xFFFFFF ,"[INFO] Você acabou de comprar um prato 'Lasanha'");
- SetPlayerHealth(playerid, health + 100.0);
- }
- }
- }
- return 1;
- }
- forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
- public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- tempposx = (oldposx -x);
- tempposy = (oldposy -y);
- tempposz = (oldposz -z);
- if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- return 1;
- }
- }
- return 0;
- }
- /* FilterScript criado totalmente do 0 por Mateus Menezes a pedidos do servidor BRG.
- Nenhum BUG encontrado, caso o encontre o mesmo entre em contato mateus.qzs@hotmail.com.
- Não retire os créditos de autoria original do FilterScript disponíveis para uso!*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement