Advertisement
Learning_SAMP

DriveThru + Fome, Sede & Sono - v2.1

Mar 14th, 2015
3,304
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 52.85 KB | None | 0 0
  1. #include "a_samp"
  2. #include "cpstream"
  3. #include "zcmd"
  4. #include "progress"
  5. #include "DOF2"
  6. //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
  7. #define FILTERSCRIPT
  8. #if defined FILTERSCRIPT
  9. #endif
  10. //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
  11. #if defined CREDITO
  12. ****************************************
  13. *  Nome: DriveThru + Fome, Sede & Sono *
  14. *  Versão: 2.1                        *
  15. *  Criador : Learning                  *
  16. *  Data: 07. Março. 2015                  *
  17. ****************************************
  18. #endif
  19. //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
  20. #define     VERMELHO    0xFF0000FF
  21. #define     AZUL        0x1E90FFFF
  22. //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
  23.     /*Dialog*/
  24. #define     DriveThru  998
  25. #define     Bebida     997
  26. #define     Lanche     996
  27. #define     DVS        995
  28. #define     D_COMANDS  994
  29. #define     D_HOTEL    993
  30.  
  31. #define DVFOMESEDESONO "/DRIVETHRUFOMESEDESONO/%s.ini"
  32. //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
  33.  
  34. /*Defines*/
  35. new CheckC_DV1, CheckC_DV2, CheckC_DV3, CheckC_DV4, CheckC_DV5, CheckC_DV6, CheckC_HT;
  36. new DThru[1200], DThru2[1200], Text:TextoFome, Bar:PGFOME, Text:TextoSede, Bar:PGSEDE, Text:TextoSono, Bar:PGSONO,\
  37. arquivado[100], bool:MorreuFome[MAX_PLAYERS], bool:MorreuSede[MAX_PLAYERS], Float:vida, ContagemSono[MAX_PLAYERS], bool:AlugouQuarto[MAX_PLAYERS],\
  38. entradahotel, saidahotel;
  39.  
  40. new Float:QuartosHotel[8][3] ={
  41.     {2244.4512,-1159.6351,1029.7969}, {2238.6926,-1159.6136,1029.7969}, {2238.4946,-1170.6606,1029.7969},
  42.     {2225.6917,-1185.7908,1029.7969}, {2209.5791,-1191.3101,1029.7969}, {2196.1775,-1173.0626,1029.8043},
  43.     {2190.6311,-1156.9851,1029.7969}, {2196.1338,-1157.1234,1029.7969}};
  44.  
  45. //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
  46. public OnPlayerConnect(playerid)
  47. {
  48.     SetTimerEx("Correcao", 1000, false, "i", playerid);
  49.     ShowProgressBarForPlayer(playerid, PGFOME);
  50.     ShowProgressBarForPlayer(playerid, PGSEDE);
  51.     ShowProgressBarForPlayer(playerid, PGSONO);
  52.     TextDrawShowForPlayer(playerid, TextoFome);
  53.     TextDrawShowForPlayer(playerid, TextoSede);
  54.     TextDrawShowForPlayer(playerid, TextoSono);
  55.     SetTimerEx("FOME", 216000, true, "i", playerid);
  56.     SetTimerEx("SEDE", 72000, true, "i", playerid);
  57.     SetTimerEx("SONO", 360000, true, "i", playerid);
  58.     format(arquivado, sizeof(arquivado), DVFOMESEDESONO, NomeDoJogador(playerid));
  59.     if(DOF2_FileExists(arquivado))
  60.     {
  61.         SetPVarInt(playerid,"FOME", DOF2_GetInt(arquivado, "FOME"));
  62.         SetPVarInt(playerid,"SEDE", DOF2_GetInt(arquivado, "SEDE"));
  63.         SetPVarInt(playerid,"SONO", DOF2_GetInt(arquivado, "SONO"));
  64.         SetProgressBarValue(PGFOME, DOF2_GetInt(arquivado, "FOME"));
  65.         SetProgressBarValue(PGSEDE, DOF2_GetInt(arquivado, "SEDE"));
  66.         SetProgressBarValue(PGSONO, DOF2_GetInt(arquivado, "SONO"));
  67.         UpdateProgressBar(PGFOME, playerid);
  68.         UpdateProgressBar(PGSEDE, playerid);
  69.         UpdateProgressBar(PGSONO, playerid);  }else{
  70.         DOF2_CreateFile(arquivado);
  71.         DOF2_SetInt(arquivado, "FOME", 100);
  72.         DOF2_SetInt(arquivado, "SEDE", 100);
  73.         DOF2_SetInt(arquivado, "SONO", 100);
  74.         SetPVarInt(playerid,"FOME", DOF2_GetInt(arquivado, "FOME"));
  75.         SetPVarInt(playerid,"SEDE", DOF2_GetInt(arquivado, "SEDE"));
  76.         SetPVarInt(playerid,"SONO", DOF2_GetInt(arquivado, "SONO"));
  77.         SetProgressBarValue(PGFOME, DOF2_GetInt(arquivado, "FOME"));
  78.         SetProgressBarValue(PGSEDE, DOF2_GetInt(arquivado, "SEDE"));
  79.         SetProgressBarValue(PGSONO, DOF2_GetInt(arquivado, "SONO"));
  80.         UpdateProgressBar(PGFOME, playerid);
  81.         UpdateProgressBar(PGSEDE, playerid);
  82.         UpdateProgressBar(PGSONO, playerid);
  83.         DOF2_SaveFile();
  84.     }
  85.     entradahotel = CreatePickup(1318, 23, 328.5529,-1513.7094,36.0391, -1); //Los Santos
  86.     saidahotel = CreatePickup(1318, 23, 2214.4348,-1150.5187,1025.7969, -1); //Los Santos
  87. //---------------------------------------- Hotel -----------------------------------------------
  88.     SetPlayerMapIcon(playerid, 0, 328.5529, -1513.7094, 36.0391, 47, 0); // LS
  89.     //---------------------------------------- DriveThru --------------------------------------------
  90.     SetPlayerMapIcon(playerid, 1, 2401.9275, -1506.4696, 23.3550, 50, 0);
  91.     SetPlayerMapIcon(playerid, 2, 800.5552, -1629.6398, 12.9030, 50, 0);
  92.     SetPlayerMapIcon(playerid, 3, 2486.0686, 2022.3807, 10.3402, 50, 0);
  93.     SetPlayerMapIcon(playerid, 4, 1179.7521, -902.8798, 42.8330, 50, 0);
  94.     SetPlayerMapIcon(playerid, 5, 1857.3107, 2081.2676, 10.3387, 50, 0);
  95.     SetPlayerMapIcon(playerid, 6, -2350.0037, -155.5846, 34.8405, 50, 0);
  96.     return 1;
  97. }
  98.  
  99. //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
  100. public OnPlayerPickUpPickup(playerid, pickupid)
  101. {
  102.     if(pickupid == entradahotel) SendClientMessage(playerid, -1, "Para entrar no Hotel use '/entrar'.");
  103.     if(pickupid == saidahotel) SendClientMessage(playerid, -1, "Para sair do Hotel use '/sair'.");
  104.     return 0;
  105. }
  106.  
  107. //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
  108. public OnPlayerDisconnect(playerid)
  109. {
  110.     SaveDVFOMESEDESONO(playerid);
  111. }
  112. //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
  113. public OnPlayerDeath(playerid, killerid, reason)
  114. {
  115.     if(MorreuFome[playerid] == true)
  116.     {
  117.         SetProgressBarValue(PGFOME, 100);
  118.         UpdateProgressBar(PGFOME, playerid);
  119.         SetPVarInt(playerid,"FOME", 100);
  120.     }
  121.     if(MorreuSede[playerid] == true)
  122.     {
  123.         SetProgressBarValue(PGSEDE, 100);
  124.         UpdateProgressBar(PGSEDE, playerid);
  125.         SetPVarInt(playerid, "SEDE", 100);
  126.     }
  127.     return 1;
  128. }
  129. //------------------------------------------------------------------------------------------------
  130. public OnFilterScriptInit()
  131. {
  132.     DisableInteriorEnterExits();
  133.  
  134.     //Barrinha
  135.     PGFOME = CreateProgressBar(530.000000, 145.000000, 60.50, 3.70, 0xFFFF00FF, 100.0);
  136.     SetProgressBarValue(PGFOME,100);
  137.     //Letra
  138.     TextoFome = TextDrawCreate(535.000000, 127.000000, "FOME");
  139.     TextDrawFont(TextoFome,3);
  140.     TextDrawLetterSize(TextoFome, 0.549999, 1.200000);
  141.     TextDrawSetShadow(TextoFome,0);
  142.     TextDrawAlignment(TextoFome,1);
  143.     TextDrawSetProportional(TextoFome,1);
  144.     TextDrawSetOutline(TextoFome,1);
  145.  
  146.     //Barrinha
  147.     PGSEDE = CreateProgressBar(530.000000, 173.000000, 60.50, 3.70, 0x00FF7FFF, 100.0);
  148.     SetProgressBarValue(PGSEDE,100);
  149.     //Letra
  150.     TextoSede = TextDrawCreate(535.000000, 155.000000, "SEDE");
  151.     TextDrawFont(TextoSede,3);
  152.     TextDrawLetterSize(TextoSede, 0.549999, 1.200000);
  153.     TextDrawSetShadow(TextoSede,0);
  154.     TextDrawAlignment(TextoSede,1);
  155.     TextDrawSetProportional(TextoSede,1);
  156.     TextDrawSetOutline(TextoSede,1);
  157.  
  158.     //Barrinha
  159.     PGSONO = CreateProgressBar(530.000000, 201.000000, 60.50, 3.70, 0x0008088A, 100.0);
  160.     SetProgressBarValue(PGSONO,100);
  161.     //Letra
  162.     TextoSono = TextDrawCreate(535.000000, 183.000000, "SONO");
  163.     TextDrawFont(TextoSono,3);
  164.     TextDrawLetterSize(TextoSono, 0.549999, 1.200000);
  165.     TextDrawSetShadow(TextoSono,0);
  166.     TextDrawAlignment(TextoSono,1);
  167.     TextDrawSetProportional(TextoSono, 1);
  168.     TextDrawSetOutline(TextoSono,1);
  169.  
  170.                                 /*Objetos*/
  171.     //Lampadas
  172.     CreateObject(3666,796.2999900,-1632.8000000,12.9000000,0.0000000,0.0000000,0.0000000); //
  173.     CreateObject(3666,804.2999900,-1633.0000000,13.1000000,0.0000000,0.0000000,0.0000000); //
  174.     CreateObject(3666,2402.7000000,-1509.9000000,23.3000000,0.0000000,0.0000000,0.0000000); //
  175.     CreateObject(3666,2402.7002000,-1501.9004000,23.3000000,0.0000000,0.0000000,0.0000000); //
  176.     CreateObject(3666,1183.8000000,-898.0999800,42.8000000,0.0000000,0.0000000,0.0000000); //
  177.     CreateObject(3666,1185.2000000,-906.4000200,42.8000000,0.0000000,0.0000000,0.0000000); //
  178.     CreateObject(3666,-2348.2000000,-156.6000100,34.8000000,0.0000000,0.0000000,0.0000000); //
  179.     CreateObject(3666,-2348.2000000,-148.2000000,34.8000000,0.0000000,0.0000000,0.0000000); //
  180.     CreateObject(3666,1861.1000000,2089.6001000,10.3000000,0.0000000,0.0000000,0.0000000); //
  181.     CreateObject(3666,1861.0000000,2080.8999000,10.3000000,0.0000000,0.0000000,0.0000000); //
  182.     CreateObject(3666,2483.8999000,2017.9000000,10.3000000,0.0000000,0.0000000,0.0000000); //
  183.     CreateObject(3666,2483.8000000,2026.7000000,10.3000000,0.0000000,0.0000000,0.0000000); //
  184.     //Posters
  185.     CreateObject(2642,2483.7000000,2018.5000000,11.0000000,0.0000000,0.0000000,0.0000000); //
  186.     CreateObject(2642,1861.3000000,2089.1001000,11.0000000,0.0000000,0.0000000,170.0000000); //
  187.     CreateObject(2642,-2347.6884800,-148.8769500,36.1853800,0.0000000,0.0000000,0.0000000); //
  188.     CreateObject(2642,-2347.7000000,-148.6000100,35.3000000,0.0000000,0.0000000,178.0000000); //
  189.     CreateObject(2642,795.2999900,-1632.9000000,13.3000000,0.0000000,0.0000000,210.0000000); //
  190.     CreateObject(2642,1184.2000000,-905.7999900,43.2000000,0.0000000,0.0000000,220.0000000); //
  191.     CreateObject(2642,2401.8000000,-1502.0000000,23.8000000,0.0000000,0.0000000,220.0000000); //
  192.     //Bases
  193.     CreateObject(3881,799.7999900,-1635.4000000,14.3000000,0.0000000,0.0000000,270.0000000); //
  194.     CreateObject(3881,2404.3999000,-1506.4000000,24.9000000,0.0000000,0.0000000,0.0000000); //
  195.     CreateObject(3881,1186.4000000,-902.4000200,43.8000000,0.0000000,0.0000000,8.0000000); //
  196.     CreateObject(3881,-2346.7000000,-152.8999900,36.2000000,0.0000000,0.0000000,0.0000000); //
  197.     CreateObject(3881,1862.5000000,2084.7000000,11.7000000,0.0000000,0.0000000,0.0000000); //
  198.     CreateObject(3881,2483.2000000,2022.8000000,11.9000000,0.0000000,0.0000000,180.0000000); //
  199. //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
  200.     /*TextLabel*/
  201.     Create3DTextLabel("{FF1E1E}DriveThru", 0xFFD700FF, 2401.9275,-1506.4696,23.3550, 40.0, 0, 0);
  202.     Create3DTextLabel("{FF1E1E}DriveThru", 0xFFD700FF, 800.5552,-1629.6398,12.9030, 40.0, 0, 0);
  203.     Create3DTextLabel("{FF1E1E}DriveThru", 0xFFD700FF, 2486.0686,2022.3807,10.3402, 40.0, 0, 0);
  204.     Create3DTextLabel("{FF1E1E}DriveThru", 0xFFD700FF, 1179.7521,-902.8798,42.8330, 40.0, 0, 0);
  205.     Create3DTextLabel("{FF1E1E}DriveThru", 0xFFD700FF, 1857.3107,2081.2676,10.3387, 40.0, 0, 0);
  206.     Create3DTextLabel("{FF1E1E}DriveThru", 0xFFD700FF, -2350.0037,-155.5846,34.8405, 40.0, 0, 0);
  207. //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
  208.     /*CheckPoint*/
  209.     CheckC_DV1 = CPS_AddCheckpoint(2401.9275,-1506.4696,23.3550, 5.0, 20);
  210.     CheckC_DV2 = CPS_AddCheckpoint(1179.7521,-902.8798,42.8330, 5.0, 20);
  211.     CheckC_DV3 = CPS_AddCheckpoint(800.5552,-1629.6398,12.9030, 5.0, 20);
  212.     CheckC_DV4 = CPS_AddCheckpoint(1857.3107,2081.2676,10.3387, 5.0, 20);
  213.     CheckC_DV5 = CPS_AddCheckpoint(2486.0686,2022.3807,10.3402, 5.0, 20);
  214.     CheckC_DV6 = CPS_AddCheckpoint(-2350.0037,-155.5846,34.8405, 5.0, 20);
  215.     CheckC_HT = CPS_AddCheckpoint(2217.3391, -1146.4551, 1025.7969, 2.0, 20); //Hotel
  216. //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
  217.     print("Sistema de DriveThru + Fome, Sede & Sono LIGADO !");
  218.     print("By : Learning");
  219.     print("http://forum.sa-mp.com/showthread.php?t=548602");
  220.     return 1;
  221. }
  222.  
  223. //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
  224. public OnFilterScriptExit()
  225. {
  226.     DOF2_Exit();
  227.     return 0;
  228. }
  229. //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
  230.     /*Comando*/
  231. CMD:entrar(playerid)
  232. {
  233.     SetPlayerInterior(playerid, 15);
  234.     SetPlayerVirtualWorld(playerid, 0);
  235.     SetPlayerPos(playerid,2218.5337,-1150.3634,1025.7969);
  236.     return 1;
  237. }
  238.  
  239. CMD:sair(playerid)
  240. {
  241.     SetPlayerInterior(playerid,0);
  242.     SetPlayerPos(playerid,335.1270, -1519.3262, 35.8672);
  243.     SetPlayerVirtualWorld(playerid, 0);
  244.     GameTextForPlayer(playerid, "~w~Los Santos", 5000, 1);
  245.     return 1;
  246. }
  247.  
  248. CMD:ls(playerid)
  249. {
  250.     SetPlayerPos(playerid,335.1270, -1519.3262, 35.8672);
  251.     return 1;
  252. }
  253.  
  254. CMD:alugarqt(playerid)
  255. {
  256.     new check = CPS_GetPlayerCheckpoint(playerid);
  257.     if(check != CheckC_HT) return SendClientMessage(playerid, VERMELHO, "[!] Você não está em um Hotel!");
  258.     ShowPlayerDialog(playerid, D_HOTEL, DIALOG_STYLE_MSGBOX,"Hotel","Aqui você podera alugar um quarto\nno valor de 100R$.\nDeseja alugar?","Alugar","Cancelar");
  259.     return 1;
  260. }
  261.  
  262. CMD:drivethru(playerid)
  263. {
  264.     if(!IsPlayerInAnyVehicle( playerid )) return SendClientMessage( playerid, VERMELHO, "| Drive Thru | Você não está em um veículo !" );
  265.     if( !IsPlayerInRangeOfPoint(playerid, 5.0, 2401.9275,-1506.4696,23.3550) && !IsPlayerInRangeOfPoint(playerid, 5.0, 1179.7521,-902.8798,42.8330)
  266.     && !IsPlayerInRangeOfPoint(playerid, 5.0, 800.5552,-1629.6398,12.9030) && !IsPlayerInRangeOfPoint(playerid, 5.0, 1857.3107,2081.2676,10.3387)
  267.     && !IsPlayerInRangeOfPoint(playerid, 5.0, 2486.0686,2022.3807,10.3402) && !IsPlayerInRangeOfPoint(playerid, 5.0, -2350.0037,-155.5846,34.8405))
  268.     return SendClientMessage(playerid,-1,"[!] {FF0000}Você não está em um Drive Thru !");
  269.     ShowPlayerDialog(playerid,DriveThru,DIALOG_STYLE_LIST,"Cardápio Drive Thru","{FF0000}- {5F9EA0}Bebida\n{FF0000}- {5F9EA0}Lanche\n","Comprar","Cancelar");
  270.     return 1;
  271. }
  272.  
  273. CMD:dvs(playerid)
  274. {
  275.     if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem Permissão !");
  276.     ShowPlayerDialog(playerid, DVS, DIALOG_STYLE_LIST, "Drive Thru","LS - Drive Thru\nLS[2] - Drive Thru\nLS[3] - Drive Thru\nSF - Drive Thru\
  277.     \nLV - Drive Thru\nLV[2] - Drive Thru\n", "Selecionar", "Cancelar");
  278.     return 1;
  279. }
  280.  
  281. CMD:setfome(playerid)
  282. {
  283.     if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1,"[!] {FF0000}Você não tem Permissão !");
  284.     SetProgressBarValue(PGFOME, 5);
  285.     UpdateProgressBar(PGFOME, playerid);
  286.     SetPVarInt(playerid,"FOME", 5);
  287.     SendClientMessage(playerid, -1, "[!] {9BCD9B}Sua barra de fome foi setada para 5");
  288.     return 1;
  289. }
  290.  
  291. CMD:rfome(playerid)
  292. {
  293.     if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1,"[!] {FF0000}Você não tem Permissão !");
  294.     SetProgressBarValue(PGFOME, 100);
  295.     UpdateProgressBar(PGFOME, playerid);
  296.     SetPVarInt(playerid,"FOME", 100);
  297.     SendClientMessage(playerid, -1, "[!] {9BCD9B}Sua barra de fome foi recuperada");
  298.     return 1;
  299. }
  300.  
  301. CMD:setsede(playerid)
  302. {
  303.     if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1,"[!] {FF0000}Você não tem Permissão !");
  304.     SetProgressBarValue(PGSEDE, 5);
  305.     UpdateProgressBar(PGSEDE, playerid);
  306.     SetPVarInt(playerid,"SEDE", 5);
  307.     SendClientMessage(playerid, -1, "[!] {9BCD9B}Sua barra de sede foi setada para 5");
  308.     return 1;
  309. }
  310.  
  311. CMD:rsede(playerid)
  312. {
  313.     if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1,"[!] {FF0000}Você não tem Permissão !");
  314.     SetProgressBarValue(PGSEDE, 100);
  315.     UpdateProgressBar(PGSEDE, playerid);
  316.     SetPVarInt(playerid,"SEDE", 100);
  317.     SendClientMessage(playerid, -1, "[!] {9BCD9B}Sua barra de sede foi recuperada");
  318.     return 1;
  319. }
  320.  
  321. CMD:setsono(playerid)
  322. {
  323.     if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1,"[!] {FF0000}Você não tem Permissão !");
  324.     SetProgressBarValue(PGSONO, 5);
  325.     UpdateProgressBar(PGSONO, playerid);
  326.     SetPVarInt(playerid,"SONO", 5);
  327.     SendClientMessage(playerid, -1, "[!] Sua barra de sono foi setada para 5");
  328.     return 1;
  329. }
  330.  
  331. CMD:rsono(playerid)
  332. {
  333.     if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1,"[!] {FF0000}Você não tem Permissão !");
  334.     SetProgressBarValue(PGSONO, 100);
  335.     UpdateProgressBar(PGSONO, playerid);
  336.     SetPVarInt(playerid,"SONO", 100);
  337.     SendClientMessage(playerid, -1, "[!] Sua barra de sono foi recuperada");
  338.     return 1;
  339. }
  340.  
  341. CMD:pmoney(playerid)
  342. {
  343.     GivePlayerMoney(playerid, 150);
  344.     SendClientMessage(playerid, -1,"[!] Você pegou R$150,00");
  345.     return 1;
  346. }
  347.  
  348. CMD:comandosfs(playerid)
  349. {
  350.     SendClientMessage(playerid, -1, "CMD : {DAA520}/SetFome  {FFFAFA}- Função : {9BCD9B}Setar barra de fome para 5 por cento");
  351.     SendClientMessage(playerid, -1, "CMD : {DAA520}/RFome  {FFFAFA}- Função : {9BCD9B}Recuperar a barra de fome para 100 por cento");
  352.     SendClientMessage(playerid, -1, "CMD : {DAA520}/dvs  {FFFAFA}- Função : {9BCD9B}Abrir dialog com teleportes para DriveThrus");
  353.     SendClientMessage(playerid, -1, "CMD : {DAA520}/PMoney  {FFFAFA}- Função : {9BCD9B}Pegar 50$ para comprar/testar 'Comes & Bebis'");
  354.     SendClientMessage(playerid, -1, "CMD : {DAA520}/SetSede  {FFFAFA}- Função : {9BCD9B}Setar barra de sede para 5 por cento");
  355.     SendClientMessage(playerid, -1, "CMD : {DAA520}/RSede  {FFFAFA}- Função : {9BCD9B}Recuperar a barra de sede para 100 por cento");
  356.     SendClientMessage(playerid, -1, "CMD : {DAA520}/SetSono  {FFFAFA}- Função : {9BCD9B}Setar barra de sono para 5 por cento");
  357.     SendClientMessage(playerid, -1, "CMD : {DAA520}/RSono  {FFFAFA}- Função : {9BCD9B}Recuperar a barra de sono para 100 por cento");
  358.     return 1;
  359. }
  360.  
  361. CMD:dormir(playerid)
  362. {
  363.     if(GetPVarInt(playerid,"SONO") >= 75) return SendClientMessage(playerid, VERMELHO,"[!] Você não esta com sono!");
  364.     if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 403 || 406 || 408 || 413 || 414 || 431 || 433 || 437 || 440 || 443 || 455 || 456 || 459 || 482 || 498 || 499 || 514 || 524 || 573 || 578 || 609 )
  365.     {
  366.         TogglePlayerControllable(playerid, true);
  367.         SetPlayerDrunkLevel(playerid, 0);
  368.         KillTimer(ContagemSono[playerid]);
  369.         TogglePlayerControllable(playerid, false);
  370.         SendClientMessage(playerid, -1, "zZzZzZzZ..");
  371.         SetTimerEx("AcordarVeiculo", 60000, false, "i", playerid);
  372.         return 1;
  373.     }
  374.     /*if(  COLOQUE A FUNÇÃO DA SUA CASA PARA UTILIZAR ESTÁ PARTE  ){
  375.         if(!(IsPlayerInRangeOfPoint(playerid, 3.0, 232.0407,1287.1119,1082.8839) || IsPlayerInRangeOfPoint(playerid, 3.0, 266.4384,1287.9473,1080.9987) || IsPlayerInRangeOfPoint(playerid, 3.0, 140.3395,1386.1359,1084.5214)
  376.         || IsPlayerInRangeOfPoint(playerid, 3.0, 135.6128,1385.3220,1089.0525) || IsPlayerInRangeOfPoint(playerid, 3.0, 152.3840,1376.2253,1089.0525) || IsPlayerInRangeOfPoint(playerid, 3.0, 147.9311,1385.3346,1089.0525)
  377.         || IsPlayerInRangeOfPoint(playerid, 3.0, 77.9491,1337.6481,1089.0231) || IsPlayerInRangeOfPoint(playerid, 3.0, 92.2879,1340.6649,1089.0265) || IsPlayerInRangeOfPoint(playerid, 3.0, 2342.0837,-1067.7916,1049.7074)
  378.         || IsPlayerInRangeOfPoint(playerid, 3.0, 2188.1179,-1210.1270,1049.7090) || IsPlayerInRangeOfPoint(playerid, 3.0, 2359.2795,-1132.7079,1051.4023) || IsPlayerInRangeOfPoint(playerid, 3.0, 2362.6367,-1122.4609,1051.5746)
  379.         || IsPlayerInRangeOfPoint(playerid, 3.0, 2198.5737,-1214.2178,1049.5664) || IsPlayerInRangeOfPoint(playerid, 3.0, 2187.7866,-1219.2948,1049.7371) || IsPlayerInRangeOfPoint(playerid, 3.0, 2258.2498,-1223.5747,1049.7917)
  380.         || IsPlayerInRangeOfPoint(playerid, 3.0, 2209.8884,-1071.9370,1051.3308) || IsPlayerInRangeOfPoint(playerid, 3.0, 2206.5239,-1071.9524,1051.3308) || IsPlayerInRangeOfPoint(playerid, 3.0, 2244.0154,-1080.1523,1049.5619)
  381.         || IsPlayerInRangeOfPoint(playerid, 3.0, 237.4120,1029.6683,1088.8088) || IsPlayerInRangeOfPoint(playerid, 3.0, 241.1674,1034.8560,1088.7943) || IsPlayerInRangeOfPoint(playerid, 3.0, 238.1896,1050.1255,1084.4961)
  382.         || IsPlayerInRangeOfPoint(playerid, 3.0, 228.5271,1050.1365,1084.4961) || IsPlayerInRangeOfPoint(playerid, 3.0, -275.3728,1448.5557,1089.4170) || IsPlayerInRangeOfPoint(playerid, 3.0, 225.8938,1251.3134,1082.8237)
  383.         || IsPlayerInRangeOfPoint(playerid, 3.0, 2241.5056,-1080.2970,1049.5619) || IsPlayerInRangeOfPoint(playerid, 3.0, 2326.3772,-1008.4699,1055.2461) || IsPlayerInRangeOfPoint(playerid, 3.0, 2285.1965,-1135.2899,1051.5265))){
  384.             SendClientMessage(playerid, VERMELHO,"[!] Você não está em uma cama!");
  385.             return 1;}
  386.     }*/
  387.     else{
  388.         if(AlugouQuarto[playerid] == false) return SendClientMessage(playerid, VERMELHO, "[!] Você não tem casa e não alugou um quarto!");
  389.         if(!(IsPlayerInRangeOfPoint(playerid, 3.0, 2246.6145,-1164.8956,1030.4943) || IsPlayerInRangeOfPoint(playerid, 3.0, 2235.8782,-1154.6770,1030.4943) || IsPlayerInRangeOfPoint(playerid, 3.0, 2235.8779,-1165.6445,1030.4943)
  390.         || IsPlayerInRangeOfPoint(playerid, 3.0, 2230.8008,-1183.2682,1030.5249) || IsPlayerInRangeOfPoint(playerid, 3.0, 2204.7166,-1193.9952,1030.5249) || IsPlayerInRangeOfPoint(playerid, 3.0, 2198.3706,-1178.1284,1030.4943)
  391.         || IsPlayerInRangeOfPoint(playerid, 3.0, 2187.9197,-1152.1074,1030.4943) || IsPlayerInRangeOfPoint(playerid, 3.0, 2198.4790,-1162.3024,1030.4943)))
  392.         {
  393.             SendClientMessage(playerid, VERMELHO,"Você não está em uma cama!");
  394.             return 1;
  395.         }
  396.     }
  397.     TogglePlayerControllable(playerid, true);
  398.     SetPlayerDrunkLevel(playerid, 0);
  399.     ApplyAnimation(playerid,"CRACK","crckdeth4",4.0,0,0,0,1,0);
  400.     KillTimer(ContagemSono[playerid]);
  401.     TogglePlayerControllable(playerid, false);
  402.     SendClientMessage(playerid, -1, "zZzZzZzZ..");
  403.     SetTimerEx("Acordar", 60000, false, "i", playerid);
  404.     return 1;
  405. }
  406.  
  407. //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
  408. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  409. {
  410.     if(dialogid == DriveThru)
  411.     {
  412.         if(response)
  413.         {
  414.             switch(listitem)
  415.             {
  416.                 case 0:
  417.                 {//Bebida
  418.                     strcat(DThru, "Agua Natural - {3DB134}$3,00\nAgua c. Gás - {3DB134}$3,00\nCoca-Cola - {3DB134}$7,00\nGuarana - {3DB134}$5,00\nFanta Uva - {3DB134}$4,00\n");
  419.                     strcat(DThru, "Fanta Laranja - {3DB134}$4,00\nItubaina - {3DB134}$4,00\nSprite - {3DB134}$3,00\nKuat - {3DB134}$3,00\nSuco de Maçã - {3DB134}$2,00\n");
  420.                     strcat(DThru, "Suco de Laranja - {3DB134}$2,00\nSuco de Limão - {3DB134}$2,00\nSuco de Maracuja - {3DB134}$2,00\nSuco de Morango - {3DB134}$2,00\n");
  421.                     strcat(DThru, "Suco de Abacaxi - {3DB134}$2,00\nCafé - {3DB134}$3,00\nCafé c.Leite - {3DB134}$3,00");
  422.                     ShowPlayerDialog(playerid, Bebida, DIALOG_STYLE_LIST, "Bebidas", DThru, "Selecionar", "Sair");
  423.                     return 1;
  424.                 }
  425.                 case 1:
  426.                 {//Lanche
  427.                     strcat(DThru2, "Arroz & Feijão - {3DB134}$25,00\nFeijoada - {3DB134}$18,00\nLasanha d.Frango - {3DB134}$35,00\nLasanha d.Carne - {3DB134}$35,00\n");
  428.                     strcat(DThru2, "Porção d.Frango F - {3DB134}$20,00\nPorção d.Batata F - {3DB134}$22,00\nPorção d.Mandioca - {3DB134}$18,00\nPastel - {3DB134}$5,00\n");
  429.                     strcat(DThru2, "Esfirra d.Carne - {3DB134}$4,00\nEsfirra d.Frango - {3DB134}$4,00\nPizza d. Queijo - {3DB134}$24,00\nPizza d.Calabresa - {3DB134}$25,00\n");
  430.                     strcat(DThru2, "Pizza d.Bacon - {3DB134}$30,00\nPizza d.Bauru - {3DB134}$23,00");
  431.                     ShowPlayerDialog(playerid, Lanche, DIALOG_STYLE_LIST, "Comidas", DThru2, "Selecionar", "Sair");
  432.                     return 1;
  433.                 }
  434.             }
  435.         }
  436.     }
  437.     /*Dialog das Bebidas*/
  438.     if( dialogid == Bebida )
  439.     {
  440.         if(response)
  441.         {
  442.             switch(listitem)
  443.             {
  444.                 case 0://Agua Natural
  445.                 {
  446.                     if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem R$3 para comprar!");
  447.                     if(GetPVarInt(playerid,"SEDE") >= 100) return SendClientMessage(playerid, VERMELHO,"| SEDE | Você está não precisa mais de bebida!");
  448.                     GivePlayerMoney(playerid, -3);
  449.                     GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida+55.0);
  450.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você acabou de tomar uma {FFFFFF}Agua Natural");
  451.                     SetPVarInt(playerid,"SEDE",GetPVarInt(playerid,"SEDE")+100);
  452.                     SetProgressBarValue(PGSEDE, GetPVarInt(playerid,"SEDE"));
  453.                     UpdateProgressBar(PGSEDE,playerid);
  454.                 }
  455.                 case 1://Coca Cola
  456.                 {
  457.                     if(GetPlayerMoney(playerid) < 7) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem R$7 para comprar!");
  458.                     if(GetPVarInt(playerid,"SEDE") >= 100) return SendClientMessage(playerid, VERMELHO,"| SEDE | Você está não precisa mais de bebida!");
  459.                     GivePlayerMoney(playerid, -7);
  460.                     GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida+55.0);
  461.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você acabou de tomar uma {FFFFFF}Coca-Cola");
  462.                     SetPVarInt(playerid,"SEDE",GetPVarInt(playerid,"SEDE")+100);
  463.                     SetProgressBarValue(PGSEDE, GetPVarInt(playerid,"SEDE"));
  464.                     UpdateProgressBar(PGSEDE,playerid);
  465.                 }
  466.                 case 2://Guarana
  467.                 {
  468.                     if(GetPlayerMoney(playerid) < 5) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem R$5 para comprar!");
  469.                     if(GetPVarInt(playerid,"SEDE") >= 100) return SendClientMessage(playerid, VERMELHO,"| SEDE | Você está não precisa mais de bebida!");
  470.                     GivePlayerMoney(playerid, -5);
  471.                     GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida+55.0);
  472.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você acabou de tomar um {FFFFFF}Guarana");
  473.                     SetPVarInt(playerid,"SEDE",GetPVarInt(playerid,"SEDE")+100);
  474.                     SetProgressBarValue(PGSEDE, GetPVarInt(playerid,"SEDE"));
  475.                     UpdateProgressBar(PGSEDE,playerid);
  476.                 }
  477.                 case 3://Fanta Uva
  478.                 {
  479.                     if(GetPlayerMoney(playerid) < 4) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem R$4 para comprar!");
  480.                     if(GetPVarInt(playerid,"SEDE") >= 100) return SendClientMessage(playerid, VERMELHO,"| SEDE | Você está não precisa mais de bebida!");
  481.                     GivePlayerMoney(playerid, -4);
  482.                     GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida+55.0);
  483.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você acabou de tomar uma {FFFFFF}Fanta Uva");
  484.                     SetPVarInt(playerid,"SEDE",GetPVarInt(playerid,"SEDE")+100);
  485.                     SetProgressBarValue(PGSEDE, GetPVarInt(playerid,"SEDE"));
  486.                     UpdateProgressBar(PGSEDE,playerid);
  487.                 }
  488.                 case 4://Fanta Laranja
  489.                 {
  490.                     if(GetPlayerMoney(playerid) < 4) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem R$4 para comprar!");
  491.                     if(GetPVarInt(playerid,"SEDE") >= 100) return SendClientMessage(playerid, VERMELHO,"| SEDE | Você está não precisa mais de bebida!");
  492.                     GivePlayerMoney(playerid, -4);
  493.                     GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida+55.0);
  494.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você acabou de tomar uma {FFFFFF}Fanta Laranja");
  495.                     SetPVarInt(playerid,"SEDE",GetPVarInt(playerid,"SEDE")+100);
  496.                     SetProgressBarValue(PGSEDE, GetPVarInt(playerid,"SEDE"));
  497.                     UpdateProgressBar(PGSEDE,playerid);
  498.                 }
  499.                 case 5://Itubaina
  500.                 {
  501.                     if(GetPlayerMoney(playerid) < 4) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem R$4 para comprar!");
  502.                     if(GetPVarInt(playerid,"SEDE") >= 100) return SendClientMessage(playerid, VERMELHO,"| SEDE | Você está não precisa mais de bebida!");
  503.                     GivePlayerMoney(playerid, -4);
  504.                     GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida+55.0);
  505.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você acabou de tomar uma {FFFFFF}Itubaina");
  506.                     SetPVarInt(playerid,"SEDE",GetPVarInt(playerid,"SEDE")+100);
  507.                     SetProgressBarValue(PGSEDE, GetPVarInt(playerid,"SEDE"));
  508.                     UpdateProgressBar(PGSEDE,playerid);
  509.                 }
  510.                 case 6://Sprit
  511.                 {
  512.                     if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem R$3 para comprar!");
  513.                     if(GetPVarInt(playerid,"SEDE") >= 100) return SendClientMessage(playerid, VERMELHO,"| SEDE | Você está não precisa mais de bebida!");
  514.                     GivePlayerMoney(playerid, -3);
  515.                     GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida+55.0);
  516.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você acabou de tomar uma {FFFFFF}Sprit");
  517.                     SetPVarInt(playerid,"SEDE",GetPVarInt(playerid,"SEDE")+100);
  518.                     SetProgressBarValue(PGSEDE, GetPVarInt(playerid,"SEDE"));
  519.                     UpdateProgressBar(PGSEDE,playerid);
  520.                 }
  521.                 case 7://Kuat
  522.                 {
  523.                     if(GetPlayerMoney(playerid) < 3) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem R$3 para comprar!");
  524.                     if(GetPVarInt(playerid,"SEDE") >= 100) return SendClientMessage(playerid, VERMELHO,"| SEDE | Você está não precisa mais de bebida!");
  525.                     GivePlayerMoney(playerid, -3);
  526.                     GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida+55.0);
  527.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você acabou de tomar uma {FFFFFF}Kuat");
  528.                     SetPVarInt(playerid,"SEDE",GetPVarInt(playerid,"SEDE")+100);
  529.                     SetProgressBarValue(PGSEDE, GetPVarInt(playerid,"SEDE"));
  530.                     UpdateProgressBar(PGSEDE,playerid);
  531.                 }
  532.                 case 8://Suco d.Maçã
  533.                 {
  534.                     if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem R$2 para comprar!");
  535.                     if(GetPVarInt(playerid,"SEDE") >= 100) return SendClientMessage(playerid, VERMELHO,"| SEDE | Você está não precisa mais de bebida!");
  536.                     GivePlayerMoney(playerid, -2);
  537.                     GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida+55.0);
  538.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você acabou de tomar um {FFFFFF}Suco de Maçã");
  539.                     SetPVarInt(playerid,"SEDE",GetPVarInt(playerid,"SEDE")+100);
  540.                     SetProgressBarValue(PGSEDE, GetPVarInt(playerid,"SEDE"));
  541.                     UpdateProgressBar(PGSEDE,playerid);
  542.                 }
  543.                 case 9://Suco d.Laranja
  544.                 {
  545.                     if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem R$2 para comprar!");
  546.                     if(GetPVarInt(playerid,"SEDE") >= 100) return SendClientMessage(playerid, VERMELHO,"| SEDE | Você está não precisa mais de bebida!");
  547.                     GivePlayerMoney(playerid, -2);
  548.                     GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida+55.0);
  549.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você acabou de tomar um {FFFFFF}Suco de Laranja");
  550.                     SetPVarInt(playerid,"SEDE",GetPVarInt(playerid,"SEDE")+100);
  551.                     SetProgressBarValue(PGSEDE, GetPVarInt(playerid,"SEDE"));
  552.                     UpdateProgressBar(PGSEDE,playerid);
  553.                 }
  554.                 case 10://Suco d.Limão
  555.                 {
  556.                     if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem R$2 para comprar!");
  557.                     if(GetPVarInt(playerid,"SEDE") >= 100) return SendClientMessage(playerid, VERMELHO,"| SEDE | Você está não precisa mais de bebida!");
  558.                     GivePlayerMoney(playerid, -2);
  559.                     GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida+55.0);
  560.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você acabou de tomar um {FFFFFF}Suco de Limão");
  561.                     SetPVarInt(playerid,"SEDE",GetPVarInt(playerid,"SEDE")+100);
  562.                     SetProgressBarValue(PGSEDE, GetPVarInt(playerid,"SEDE"));
  563.                     UpdateProgressBar(PGSEDE,playerid);
  564.                 }
  565.                 case 11://Suco d.Maracuja
  566.                 {
  567.                     if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem R$2 para comprar!");
  568.                     if(GetPVarInt(playerid,"SEDE") >= 100) return SendClientMessage(playerid, VERMELHO,"| SEDE | Você está não precisa mais de bebida!");
  569.                     GivePlayerMoney(playerid, -2);
  570.                     GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida+55.0);
  571.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você acabou de tomar um {FFFFFF}Suco de Maracuja");
  572.                     SetPVarInt(playerid,"SEDE",GetPVarInt(playerid,"SEDE")+100);
  573.                     SetProgressBarValue(PGSEDE, GetPVarInt(playerid,"SEDE"));
  574.                     UpdateProgressBar(PGSEDE,playerid);
  575.                 }
  576.                 case 12://Suco d.Morango
  577.                 {
  578.                     if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem R$2 para comprar!");
  579.                     if(GetPVarInt(playerid,"SEDE") >= 100) return SendClientMessage(playerid, VERMELHO,"| SEDE | Você está não precisa mais de bebida!");
  580.                     GivePlayerMoney(playerid, -2);
  581.                     GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida+55.0);
  582.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você acabou de tomar um {FFFFFF}Suco de Morango");
  583.                     SetPVarInt(playerid,"SEDE",GetPVarInt(playerid,"SEDE")+100);
  584.                     SetProgressBarValue(PGSEDE, GetPVarInt(playerid,"SEDE"));
  585.                     UpdateProgressBar(PGSEDE,playerid);
  586.                 }
  587.                 case 13://Suco d.Abacaxi
  588.                 {
  589.                     if(GetPlayerMoney(playerid) < 2) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem R$2 para comprar!");
  590.                     if(GetPVarInt(playerid,"SEDE") >= 100) return SendClientMessage(playerid, VERMELHO,"| SEDE | Você está não precisa mais de bebida!");
  591.                     GivePlayerMoney(playerid, -2);
  592.                     GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida+55.0);
  593.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você acabou de tomar um {FFFFFF}Suco de Abacaxi");
  594.                     SetPVarInt(playerid,"SEDE",GetPVarInt(playerid,"SEDE")+100);
  595.                     SetProgressBarValue(PGSEDE, GetPVarInt(playerid,"SEDE"));
  596.                     UpdateProgressBar(PGSEDE,playerid);
  597.                 }
  598.                 case 14:
  599.                 {
  600.                     ShowPlayerDialog(playerid, DriveThru, DIALOG_STYLE_LIST, "Cardápio Drive Thru","{FF0000}- {5F9EA0}Bebida\n{FF0000}- {5F9EA0}Lanche", "Comprar", "Cancelar");
  601.                     return 1;
  602.                 }
  603.             }
  604.         }
  605.     }
  606.     /*Dialog das Comidas*/
  607.     if( dialogid == Lanche )
  608.     {
  609.         if(response)
  610.         {
  611.             switch(listitem)
  612.             {
  613.                 case 0://Arroz & Feijão
  614.                 {
  615.                     if(GetPlayerMoney(playerid) < 25) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem R$25 para comprar!");
  616.                     if(GetPVarInt(playerid,"FOME") >= 100) return SendClientMessage(playerid, VERMELHO,"| FOME | Você está satisfeito, não precisa mais de comida!");
  617.                     GivePlayerMoney(playerid, -25);
  618.                     GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida+75.0);
  619.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você acabou de comer um {FFFFFF}Arroz & Feijão");
  620.                     SetPVarInt(playerid,"FOME",GetPVarInt(playerid,"FOME")+100);
  621.                     SetProgressBarValue(PGFOME, GetPVarInt(playerid,"FOME"));
  622.                     UpdateProgressBar(PGFOME,playerid);
  623.                 }
  624.                 case 1://Feijoada
  625.                 {
  626.                     if(GetPlayerMoney(playerid) < 18) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem R$18 para comprar!");
  627.                     if(GetPVarInt(playerid,"FOME") >= 100) return SendClientMessage(playerid, VERMELHO,"| FOME | Você está satisfeito, não precisa mais de comida!");
  628.                     GivePlayerMoney(playerid, -18);
  629.                     GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida+75.0);
  630.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você acabou de comer uma {FFFFFF}Feijoada");
  631.                     SetPVarInt(playerid,"FOME",GetPVarInt(playerid,"FOME")+100);
  632.                     SetProgressBarValue(PGFOME, GetPVarInt(playerid,"FOME"));
  633.                     UpdateProgressBar(PGFOME,playerid);
  634.                 }
  635.                 case 2://Lasanha d.Frango
  636.                 {
  637.                     if(GetPlayerMoney(playerid) < 35) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem R$35 para comprar!");
  638.                     if(GetPVarInt(playerid,"FOME") >= 100) return SendClientMessage(playerid, VERMELHO,"| FOME | Você está satisfeito, não precisa mais de comida!");
  639.                     GivePlayerMoney(playerid, -35);
  640.                     GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida+75.0);
  641.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você acabou de comer uma {FFFFFF}Lasanha de Frango");
  642.                     SetPVarInt(playerid,"FOME",GetPVarInt(playerid,"FOME")+100);
  643.                     SetProgressBarValue(PGFOME, GetPVarInt(playerid,"FOME"));
  644.                     UpdateProgressBar(PGFOME,playerid);
  645.                 }
  646.                 case 3://Lazanha d.Carne
  647.                 {
  648.                     if(GetPlayerMoney(playerid) < 35) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem R$35 para comprar!");
  649.                     if(GetPVarInt(playerid,"FOME") >= 100) return SendClientMessage(playerid, VERMELHO,"| FOME | Você está satisfeito, não precisa mais de comida!");
  650.                     GivePlayerMoney(playerid, -35);
  651.                     GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida+75.0);
  652.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você acabou de comer uma {FFFFFF}Lasanha de Carne");
  653.                     SetPVarInt(playerid,"FOME",GetPVarInt(playerid,"FOME")+100);
  654.                     SetProgressBarValue(PGFOME, GetPVarInt(playerid,"FOME"));
  655.                     UpdateProgressBar(PGFOME,playerid);
  656.                 }
  657.                 case 4://Porção d.Frango F
  658.                 {
  659.                     if(GetPlayerMoney(playerid) < 20) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem R$20 para comprar!");
  660.                     if(GetPVarInt(playerid,"FOME") >= 100) return SendClientMessage(playerid, VERMELHO,"| FOME | Você está satisfeito, não precisa mais de comida!");
  661.                     GivePlayerMoney(playerid, -20);
  662.                     GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida+75.0);
  663.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você acabou de comer uma {FFFFFF}Porção de Frango Frito");
  664.                     SetPVarInt(playerid,"FOME",GetPVarInt(playerid,"FOME")+100);
  665.                     SetProgressBarValue(PGFOME, GetPVarInt(playerid,"FOME"));
  666.                     UpdateProgressBar(PGFOME,playerid);
  667.                 }
  668.                 case 5://Porção d.Batata F
  669.                 {
  670.                     if(GetPlayerMoney(playerid) < 22) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem R$22 para comprar!");
  671.                     if(GetPVarInt(playerid,"FOME") >= 100) return SendClientMessage(playerid, VERMELHO,"| FOME | Você está satisfeito, não precisa mais de comida!");
  672.                     GivePlayerMoney(playerid, -22);
  673.                     GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida+75.0);
  674.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você acabou de comer uma {FFFFFF}Porção de Batata Frita");
  675.                     SetPVarInt(playerid,"FOME",GetPVarInt(playerid,"FOME")+100);
  676.                     SetProgressBarValue(PGFOME, GetPVarInt(playerid,"FOME"));
  677.                     UpdateProgressBar(PGFOME,playerid);
  678.                 }
  679.                 case 6://Porção d.Mandioca F
  680.                 {
  681.                     if(GetPlayerMoney(playerid) < 18) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem R$18 para comprar!");
  682.                     if(GetPVarInt(playerid,"FOME") >= 100) return SendClientMessage(playerid, VERMELHO,"| FOME | Você está satisfeito, não precisa mais de comida!");
  683.                     GivePlayerMoney(playerid, -18);
  684.                     GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida+75.0);
  685.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você acabou de comer uma {FFFFFF}Porção de Mandioca Frita");
  686.                     SetPVarInt(playerid,"FOME",GetPVarInt(playerid,"FOME")+100);
  687.                     SetProgressBarValue(PGFOME, GetPVarInt(playerid,"FOME"));
  688.                     UpdateProgressBar(PGFOME,playerid);
  689.                 }
  690.                 case 7://Pastel
  691.                 {
  692.                     if(GetPlayerMoney(playerid) < 5) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem R$5 para comprar!");
  693.                     if(GetPVarInt(playerid,"FOME") >= 100) return SendClientMessage(playerid, VERMELHO,"| FOME | Você está satisfeito, não precisa mais de comida!");
  694.                     GivePlayerMoney(playerid, -5);
  695.                     GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida+75.0);
  696.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você acabou de comer um {FFFFFF}Pastel");
  697.                     SetPVarInt(playerid,"FOME",GetPVarInt(playerid,"FOME")+100);
  698.                     SetProgressBarValue(PGFOME, GetPVarInt(playerid,"FOME"));
  699.                     UpdateProgressBar(PGFOME,playerid);
  700.                 }
  701.                 case 8://Esfirra de Carne
  702.                 {
  703.                     if(GetPlayerMoney(playerid) < 4) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem R$4 para comprar!");
  704.                     if(GetPVarInt(playerid,"FOME") >= 100) return SendClientMessage(playerid, VERMELHO,"| FOME | Você está satisfeito, não precisa mais de comida!");
  705.                     GivePlayerMoney(playerid, -4);
  706.                     GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida+75.0);
  707.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você acabou de comer uma {FFFFFF}Esfirra de Carne");
  708.                     SetPVarInt(playerid,"FOME",GetPVarInt(playerid,"FOME")+100);
  709.                     SetProgressBarValue(PGFOME, GetPVarInt(playerid,"FOME"));
  710.                     UpdateProgressBar(PGFOME,playerid);
  711.                 }
  712.                 case 9://Esfirra de Carne
  713.                 {
  714.                     if(GetPlayerMoney(playerid) < 4) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem R$4 para comprar!");
  715.                     if(GetPVarInt(playerid,"FOME") >= 100) return SendClientMessage(playerid, VERMELHO,"| FOME | Você está satisfeito, não precisa mais de comida!");
  716.                     GivePlayerMoney(playerid, -4);
  717.                     GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida+75.0);
  718.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você acabou de comer uma {FFFFFF}Esfirra de Frango");
  719.                     SetPVarInt(playerid,"FOME",GetPVarInt(playerid,"FOME")+100);
  720.                     SetProgressBarValue(PGFOME, GetPVarInt(playerid,"FOME"));
  721.                     UpdateProgressBar(PGFOME,playerid);
  722.                 }
  723.                 case 10://Pizza de Queijo
  724.                 {
  725.                     if(GetPlayerMoney(playerid) < 24) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem R$24 para comprar!");
  726.                     if(GetPVarInt(playerid,"FOME") >= 100) return SendClientMessage(playerid, VERMELHO,"| FOME | Você está satisfeito, não precisa mais de comida!");
  727.                     GivePlayerMoney(playerid, -24);
  728.                     GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida+75.0);
  729.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você acabou de comer uma {FFFFFF}Pizza de Queijo");
  730.                     SetPVarInt(playerid,"FOME",GetPVarInt(playerid,"FOME")+100);
  731.                     SetProgressBarValue(PGFOME, GetPVarInt(playerid,"FOME"));
  732.                     UpdateProgressBar(PGFOME,playerid);
  733.                 }
  734.                 case 11://Pizza de Calabresa
  735.                 {
  736.                     if(GetPlayerMoney(playerid) < 25) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem R$25 para comprar!");
  737.                     if(GetPVarInt(playerid,"FOME") >= 100) return SendClientMessage(playerid, VERMELHO,"| FOME | Você está satisfeito, não precisa mais de comida!");
  738.                     GivePlayerMoney(playerid, -25);
  739.                     GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida+75.0);
  740.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você acabou de comer uma {FFFFFF}Pizza de Calabresa");
  741.                     SetPVarInt(playerid,"FOME",GetPVarInt(playerid,"FOME")+100);
  742.                     SetProgressBarValue(PGFOME, GetPVarInt(playerid,"FOME"));
  743.                     UpdateProgressBar(PGFOME,playerid);
  744.                 }
  745.                 case 12://Pizza de Bacon
  746.                 {
  747.                     if(GetPlayerMoney(playerid) < 25) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem R$25 para comprar!");
  748.                     if(GetPVarInt(playerid,"FOME") >= 100) return SendClientMessage(playerid, VERMELHO,"| FOME | Você está satisfeito, não precisa mais de comida!");
  749.                     GivePlayerMoney(playerid, -25);
  750.                     GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida+75.0);
  751.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você acabou de comer uma {FFFFFF}Pizza de Bacon");
  752.                     SetPVarInt(playerid,"FOME",GetPVarInt(playerid,"FOME")+100);
  753.                     SetProgressBarValue(PGFOME, GetPVarInt(playerid,"FOME"));
  754.                     UpdateProgressBar(PGFOME,playerid);
  755.                 }
  756.                 case 13://Pizza de Bauru
  757.                 {
  758.                     if(GetPlayerMoney(playerid) < 30) return SendClientMessage(playerid, 0xFF0000FF,"| DriveThru | Você não tem R$30 para comprar!");
  759.                     if(GetPVarInt(playerid,"FOME") >= 100) return SendClientMessage(playerid, VERMELHO,"| FOME | Você está satisfeito, não precisa mais de comida!");
  760.                     GivePlayerMoney(playerid, -30);
  761.                     GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida+75.0);
  762.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você acabou de comer uma {FFFFFF}Pizza de Bauru");
  763.                     SetPVarInt(playerid,"FOME",GetPVarInt(playerid,"FOME")+100);
  764.                     SetProgressBarValue(PGFOME, GetPVarInt(playerid,"FOME"));
  765.                     UpdateProgressBar(PGFOME,playerid);
  766.                 }
  767.                 case 14:
  768.                 {
  769.                     ShowPlayerDialog(playerid, DriveThru, DIALOG_STYLE_LIST, "Cardápio Drive Thru","{FF0000}- {5F9EA0}Bebida\n{FF0000}- {5F9EA0}Lanche", "Comprar", "Cancelar");
  770.                     return 1;
  771.                 }
  772.             }
  773.         }
  774.     }
  775.     /*Dialog dos teleportes*/
  776.     if( dialogid == DVS )
  777.     {
  778.         if(response)
  779.         {
  780.             switch(listitem)
  781.             {
  782.                 case 0://LS
  783.                 {
  784.                     SetPlayerPos( playerid, 2401.9275,-1506.4696,23.3550 );
  785.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você foi para o Drive Thru de {FFFFFF}LS");
  786.                     return 1;
  787.                 }
  788.                 case 1://LS[2]
  789.                 {
  790.                     SetPlayerPos( playerid, 800.5552,-1629.6398,12.9030 );
  791.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você foi para o Drive Thru de{FFFFFF}LS[2]");
  792.                     return 1;
  793.                 }
  794.                 case 2://LS[3]
  795.                 {
  796.                     SetPlayerPos( playerid, 1179.7521,-902.8798,42.8330 );
  797.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você foi para o Drive Thru de{FFFFFF}LS[3]");
  798.                     return 1;
  799.                 }
  800.                 case 3://SF
  801.                 {
  802.                     SetPlayerPos( playerid, -2350.0037,-155.5846,34.8405 );
  803.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você foi para o Drive Thru de{FFFFFF}SF");
  804.                     return 1;
  805.                 }
  806.                 case 4://LV
  807.                 {
  808.                     SetPlayerPos( playerid, 1857.3107,2081.2676,10.3387 );
  809.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você foi para o Drive Thru de{FFFFFF}LV");
  810.                     return 1;
  811.                 }
  812.                 case 5://LV[2]
  813.                 {
  814.                     SetPlayerPos( playerid, 2486.0686,2022.3807,10.3402 );
  815.                     SendClientMessage(playerid, 0x1E90FFFF,"| DriveThru | Você foi para o Drive Thru de{FFFFFF}LV[2]");
  816.                     return 1;
  817.                 }
  818.             }
  819.         }
  820.     }
  821.     /*Dialog do Hotel*/
  822.     if(dialogid == D_HOTEL)
  823.     {
  824.         if(response)
  825.         {
  826.             if(AlugouQuarto[playerid] == true) return SendClientMessage(playerid, -VERMELHO,"[!] Você já alugou um quarto recentemente.");
  827.             if(GetPlayerMoney(playerid) < 150) return SendClientMessage(playerid, VERMELHO,"[!] Você não tem R$150 para alugar!");
  828.             if(GetPVarInt(playerid,"SONO") >= 75) return SendClientMessage(playerid,VERMELHO,"[!]Você não esta com sono!");
  829.             SendClientMessage(playerid, -1, "Use '/Dormir', em cima da cama para poder dormir !");
  830.             new QHotel = random(sizeof(QuartosHotel));
  831.             SetPlayerPos(playerid, QuartosHotel[QHotel][0], QuartosHotel[QHotel][1],QuartosHotel[QHotel][2]);
  832.             GivePlayerMoney(playerid, -150);
  833.             AlugouQuarto[playerid] = true;
  834.         }
  835.     }
  836.     return 0;
  837. }
  838.  
  839. //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
  840. public OnPlayerEnterCheckpoint(playerid)
  841. {
  842.     new checknome = CPS_GetPlayerCheckpoint(playerid);
  843.     if(checknome == CheckC_HT)
  844.     {
  845.         SendClientMessage(playerid, 0xFF0000FF, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  846.         SendClientMessage(playerid, 0x1E90FFFF, " Olá você está no {FFFFFF}Hotel {1E90FF}!");
  847.         SendClientMessage(playerid, 0x1E90FFFF, " Para alugar um quarto --> {FFFFFF}/AlugarQT");
  848.         SendClientMessage(playerid, 0xFF0000FF, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  849.     }
  850.     if(checknome == CheckC_DV1 || checknome == CheckC_DV2 || checknome == CheckC_DV3 || checknome == CheckC_DV4 || checknome == CheckC_DV5 || checknome == CheckC_DV6)
  851.     {
  852.         if(!IsPlayerInAnyVehicle(playerid)) return 1;
  853.         SendClientMessage(playerid, 0xFF0000FF, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  854.         SendClientMessage(playerid, 0x1E90FFFF, " Olá {FFFFFF}Trabalhador, {1E90FF}você está no {FFFFFF}DriveThru {1E90FF}!");
  855.         SendClientMessage(playerid, 0x1E90FFFF, " Para vê nossas Ofertas --> {FFFFFF}/DriveThru");
  856.         SendClientMessage(playerid, 0xFF0000FF, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  857.     }
  858.     return 1;
  859. }
  860.  
  861. //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
  862. forward SEDE(playerid);
  863. public SEDE(playerid)
  864. {
  865.     SetPVarInt(playerid,"SEDE", GetPVarInt(playerid,"SEDE")-1);
  866.     SetProgressBarValue(PGSEDE, GetPVarInt(playerid,"SEDE"));
  867.     UpdateProgressBar(PGSEDE,playerid);
  868.  
  869.     if(GetPVarInt(playerid,"SEDE") <= 5)
  870.     {
  871.         GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida - 20.0);
  872.         SendClientMessage(playerid, 0xFF0000FF,"[!] Vá até a lanchonete comer ou irá morrer de fome!");
  873.     }
  874.     if(GetPVarInt(playerid,"SEDE") <= 0)
  875.     {
  876.         SetPlayerHealth(playerid, 0);
  877.         SendClientMessage(playerid, 0xFF0000FF, "[!] Você morreu de fome!");
  878.         MorreuSede[playerid] = true;
  879.     }
  880.     return 1;
  881. }
  882.  
  883. //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
  884. forward FOME(playerid);
  885. public FOME(playerid)
  886. {
  887.     SetPVarInt(playerid,"FOME", GetPVarInt(playerid,"FOME")-1);
  888.     SetProgressBarValue(PGFOME, GetPVarInt(playerid,"FOME"));
  889.     UpdateProgressBar(PGFOME,playerid);
  890.  
  891.     if(GetPVarInt(playerid,"FOME") <= 5)
  892.     {
  893.         GetPlayerHealth(playerid,vida),SetPlayerHealth(playerid,vida - 20.0);
  894.         SendClientMessage(playerid, 0xFF0000FF,"[!] Vá até a lanchonete comer ou irá morrer de fome!");
  895.     }
  896.     if(GetPVarInt(playerid,"FOME") <= 0)
  897.     {
  898.         SetPlayerHealth(playerid, 0);
  899.         SendClientMessage(playerid, 0xFF0000FF, "[!] Você morreu de fome!");
  900.         MorreuFome[playerid] = true;
  901.     }
  902.     return 1;
  903. }
  904.  
  905. //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
  906. forward SONO(playerid);
  907. public SONO(playerid)
  908. {
  909.     SetPVarInt(playerid,"SONO",GetPVarInt(playerid,"SONO")-1);
  910.     SetProgressBarValue(PGSONO, GetPVarInt(playerid,"SONO"));
  911.     UpdateProgressBar(PGSONO,playerid);
  912.  
  913.     if(GetPVarInt(playerid,"SONO") <= 10 && GetPVarInt(playerid,"SONO") > 5)
  914.     {
  915.         SendClientMessage(playerid,-1,"[!] Você esta passando mal por excesso de sono, se não durmir podera desmaiar.");
  916.         SetPlayerDrunkLevel(playerid, 4000);
  917.     }
  918.     if(GetPVarInt(playerid,"SONO") <= 0)
  919.     {
  920.         SetPlayerDrunkLevel(playerid, 0);
  921.         ApplyAnimation(playerid,"CRACK","crckdeth4",4.0,0,0,0,1,0);
  922.         KillTimer(ContagemSono[playerid]);
  923.         SendClientMessage(playerid,0xDCDCDCFF,"[!] Você tirou uma soneca por excesso de sono...");
  924.         SetTimerEx("AcordarDes", 10000, false, "i", playerid);
  925.         TogglePlayerControllable(playerid, false);
  926.     }
  927.     return 1;
  928. }
  929.  
  930. //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
  931. forward AcordarVeiculo(playerid);
  932. public AcordarVeiculo(playerid)
  933. {
  934.     TogglePlayerControllable(playerid, true);
  935.     SendClientMessage(playerid, 0xDCDCDCFF, "[!] Você acordou");
  936.     ContagemSono[playerid] = SetTimerEx("SONO", 1800000, true, "i", playerid);
  937.     SetProgressBarValue(PGSONO, 100);
  938.     UpdateProgressBar(PGSONO, playerid);
  939.     SetPVarInt(playerid,"SONO", 100);
  940.     return 1;
  941. }
  942.  
  943. //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
  944. forward Acordar(playerid);
  945. public Acordar(playerid)
  946. {
  947.     TogglePlayerControllable(playerid, true);
  948.     ClearAnimations(playerid);
  949.     ContagemSono[playerid] = SetTimerEx("SONO", 35000, true, "i", playerid);
  950.     SetProgressBarValue(PGSONO, 100);
  951.     UpdateProgressBar(PGSONO, playerid);
  952.     SetPVarInt(playerid,"SONO", 100);
  953.     return 1;
  954. }
  955.  
  956. //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
  957. forward AcordarDes(playerid);
  958. public AcordarDes(playerid)
  959. {
  960.     TogglePlayerControllable(playerid, true);
  961.     ClearAnimations(playerid);
  962.     ContagemSono[playerid] = SetTimerEx("SONO", 35000, true, "i", playerid);
  963.     SetProgressBarValue(PGSONO, 100);
  964.     UpdateProgressBar(PGSONO, playerid);
  965.     SetPVarInt(playerid,"SONO", 100);
  966.     SendClientMessage(playerid, AZUL,"[!] Você acordou do seu excesso de sono");
  967.     return 1;
  968. }
  969. //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
  970. forward SaveDVFOMESEDESONO(playerid);
  971. public SaveDVFOMESEDESONO(playerid)
  972. {
  973.     format(arquivado, sizeof(arquivado), DVFOMESEDESONO, NomeDoJogador(playerid));
  974.     if(DOF2_FileExists(arquivado))
  975.     {
  976.         DOF2_SetInt(arquivado,"FOME", GetPVarInt(playerid,"FOME"));
  977.         DOF2_SetInt(arquivado,"SEDE", GetPVarInt(playerid,"SEDE"));
  978.         DOF2_SaveFile();
  979.     }
  980.     return 1;
  981. }
  982.  
  983. //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
  984. forward Correcao(playerid);
  985. public Correcao(playerid)
  986. {
  987.     if(GetPVarInt(playerid,"SEDE") > 100)
  988.     {
  989.         SetPVarInt(playerid,"SEDE", 100);
  990.         SetProgressBarValue(PGSEDE, GetPVarInt(playerid,"SEDE"));
  991.         UpdateProgressBar(PGSEDE,playerid);
  992.     }
  993.     if(GetPVarInt(playerid,"FOME") > 100)
  994.     {
  995.         SetPVarInt(playerid,"FOME", 100);
  996.         SetProgressBarValue(PGFOME, GetPVarInt(playerid,"FOME"));
  997.         UpdateProgressBar(PGFOME, playerid);
  998.     }
  999.     return 0;
  1000. }
  1001.  
  1002. //--------------------------------------------------------------------------------------------------------------------------------------------------------------------
  1003. stock NomeDoJogador(playerid)
  1004. {
  1005.     new nome[MAX_PLAYER_NAME];
  1006.     GetPlayerName(playerid,nome,sizeof(nome));
  1007.     return nome;
  1008. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement