Jump to content

zTokyoGamer

Members
  • Posts

    38
  • Joined

  • Last visited

Everything posted by zTokyoGamer

  1. Também gostaria de saber como funciona converte um mapa do GTA:SA para MTA
  2. Ainda não amigo @yanz3ra irei olha mas dez de já muito obrigado ?
  3. @DNL291 Já fiz isso meu querido e não deu muito certo mas vou continua aqui se souber os código que irei usa mim diz ai que fica mas fácil
  4. Estou criando um systema de construção de bases para meu servidor de DayZ estou tentando que como move o objeto manual e não estou conseguindo cria esta função por exemplo apos eu colocar ele no local eu queria usa algum tipo de tecla para muda as rotação clicando na tecla e move ele clicando nele e coloca no luga que vou clica para ele fica , alguém poderia mim ajuda já estou virando madrugadas pesquisando estudando tentando fazer isso e esta um pouco complicado para mim! Imagem: Server.Lua addEvent ("Wooden", true) addEventHandler ("Wooden", getRootElement(), function() if (getPlayerMoney (source) >= tonumber(400)) then outputChatBox("#00FF00Você colocou um Wooden Parede", source, 255, 255, 255 , true) local x,y,z = getElementPosition(source) setElementPosition ( source, posX, posY, posZ ) obj = createObject(3260,x,y + 3,z, -0, 0, 350.093) -- ID DO OBJETO + POSIÇÃO setTimer ( destroyElement, 172800000, 1, obj ) -- 2 Dias takePlayerMoney (source, tonumber (400)) else outputChatBox ("Você é muito pobre!", source, 255, 0, 0, false) end end) Client.Lua iSantistaWindow = guiCreateWindow(203, 154, 270, 370, "Painel Criar Base ~DayZ", false) guiWindowSetSizable(iSantistaWindow, false) guiSetAlpha(iSantistaWindow, 1.00) selecionar = guiCreateButton(9, 310, 270, 50, "COLOCAR", false, iSantistaWindow) guiSetFont(selecionar, "default-bold-small") guiSetProperty(selecionar, "NormalTextColour", "FFFFFFFF") Horns = guiCreateGridList(9, 24, 270, 280, false, iSantistaWindow) guiGridListSetSelectionMode(Horns, 1) column = guiGridListAddColumn(Horns, "Itens", 0.9) local painel painel = guiGridListAddRow(Horns) guiGridListSetItemText(Horns, painel, 1, "MADEIRA", false, false) guiGridListSetItemColor (Horns, painel, 1, 255, 0, 0 ) painel = guiGridListAddRow(Horns) guiGridListSetItemText(Horns, painel, 1, " Wooden Parede 400 GOLD", false, false) painel = guiGridListAddRow(Horns) guiGridListSetItemText(Horns, painel, 1, " Wood Fence 420 GOLD", false, false) painel = guiGridListAddRow(Horns) guiGridListSetItemText(Horns, painel, 1, " Wooden Door 300 GOLD", false, false) painel = guiGridListAddRow(Horns) guiGridListSetItemText(Horns, painel, 1, " Wood Structure 500 GOLD", false, false) painel = guiGridListAddRow(Horns) guiGridListSetItemText(Horns, painel, 1, "METAL", false, false) guiGridListSetItemColor (Horns, painel, 1, 255, 0, 0 ) painel = guiGridListAddRow(Horns) guiGridListSetItemText(Horns, painel, 1, " Metal Fence 600 GOLD", false, false) painel = guiGridListAddRow(Horns) guiGridListSetItemText(Horns, painel, 1, " Metal Door 570 GOLD", false, false) painel = guiGridListAddRow(Horns) guiGridListSetItemText(Horns, painel, 1, " Metal Galpao 900 GOLD", false, false) painel = guiGridListAddRow(Horns) guiGridListSetItemText(Horns, painel, 1, " Metal Escada 460 GOLD", false, false) painel = guiGridListAddRow(Horns) guiGridListSetItemText(Horns, painel, 1,"LUZES", false, false) guiGridListSetItemColor (Horns, painel, 1, 255, 0, 0 ) painel = guiGridListAddRow(Horns) guiGridListSetItemText(Horns, painel, 1," Lampada 1 100 GOLD", false, false) painel = guiGridListAddRow(Horns) guiGridListSetItemText(Horns, painel, 1," Lampada 2 150 GOLD", false, false) painel = guiGridListAddRow(Horns) guiGridListSetItemText(Horns, painel, 1," Tocha 200 GOLD", false, false) painel = guiGridListAddRow(Horns) guiGridListSetItemText(Horns, painel, 1," Explosivo 350 GOLD", false, false) painel = guiGridListAddRow(Horns) guiGridListSetItemText(Horns, painel, 1," Sofa 120 GOLD", false, false) guiSetVisible(iSantistaWindow, false) local player = getLocalPlayer() addEventHandler("onClientGUIClick", selecionar, function() local row, column = guiGridListGetSelectedItem(Horns) if row == 1 then ----- CZ triggerServerEvent("Wooden", player, 2) elseif row == 2 then ----- M4 triggerServerEvent("Fence", player,3) elseif row == 3 then ----- M4 triggerServerEvent("Door", player,4) elseif row == 4 then ----- M4 triggerServerEvent("Structure", player,6) elseif row == 6 then ----- M4 triggerServerEvent("Fence2", player,7) elseif row == 7 then ----- M4 triggerServerEvent("Door2", player,8) elseif row == 8 then ----- M4 triggerServerEvent("Galpao", player,9) elseif row == 9 then ----- M4 triggerServerEvent("Escada", player,10) elseif row == 11 then ----- M4 triggerServerEvent("Luz", player,12) elseif row == 12 then ----- M4 triggerServerEvent("Luz2", player,13) elseif row == 13 then ----- M4 triggerServerEvent("Tocha", player,14) elseif row == 14 then ----- M4 triggerServerEvent("Explosivo", player,15) elseif row == 15 then ----- M4 triggerServerEvent("Sofa", player,16) end end, false) basecreat = function() if guiGetVisible(iSantistaWindow) then guiSetVisible(iSantistaWindow, false) showCursor(false) else guiSetVisible(iSantistaWindow, true) showCursor(true) end end addEvent("ShowGUI", true) addEventHandler("ShowGUI", getRootElement(), basecreat)
  5. REMOÇÃO DE TODO O MAPA DO MTA Olá galera vim aqui pede a ajuda de vocês estou querendo cria um mapa do 0 ao meus gosto queria sabe como eu posso remove todos objetos do MTA uma forma mas rápida pois pelo editor iria demora muito para sai removendo objetos por objetos! Iria tenta também a remoção de mapas usando <removeWorldObject Porem iria precisa da posição certa de cada Objetos então não sei o que fazer ja venho a uma semana pesquisando e tentando alguém poderia mim ajuda com isso?
  6. Olá estou com um problema estou usando um sytema de gasolina coloquei meu servidor a 71 de FPS quando ligo o script de gasolina vai para 51 quando desligo volta aos 71 FPS ele esta limitando o fps tentei arruma mas não conseguir então vim aqui pede ajuda por favor ajuda ai galera! --[[ /\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\/ Curta a Minha Página <3 https://www.facebook.com/danilinmtascr/ ::::::::: ::: :::: ::: ::::::::::: ::: ::::::::::: :::: ::: :+: :+: :+: :+: :+:+: :+: :+: :+: :+: :+:+: :+: +:+ +:+ +:+ +:+ :+:+:+ +:+ +:+ +:+ +:+ :+:+:+ +:+ +#+ +:+ +#++:++#++: +#+ +:+ +#+ +#+ +#+ +#+ +#+ +:+ +#+ +#+ +#+ +#+ +#+ +#+ +#+#+# +#+ +#+ +#+ +#+ +#+#+# #+# #+# #+# #+# #+# #+#+# #+# #+# #+# #+# #+#+# ######### ### ### ### #### ########### ########## ########### ### #### /\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\/ --]] local screenW,screenH = guiGetScreenSize() local resW,resH = 1366,768 local x,y = (screenW/resW), (screenH/resH) local Font_1 = dxCreateFont("font/font.ttf", y*9.8) local Font_2 = dxCreateFont("font/font1.ttf", y*11) local Font_3 = dxCreateFont("font/fontNick.ttf", y*10) local Font_4 = dxCreateFont("font/OpenSans-Bold.ttf", y*11) local Bomba = dxCreateTexture( "Img/Bomba.png" ) local Marcador = dxCreateTexture("Img/Marcador.png") local Seta = dxCreateTexture("Img/Seta.png") local Seta_Mangueira = dxCreateTexture("Img/Seta_Mangueira.png") local Litro_Fuel = createElement("dxEditBox_Fuel") --[[ ><><><><><><><><><><><><><><>< >< Abrir/Fechar >< ><><><><><><><><><><><><><><>< --]] function Abrir_Posto_1 () if isEventHandlerAdded("onClientRender", getRootElement(), Dx_Posto) then return end Refresh_Posto_1 () Veh_Posto:SetVisible(true) showCursor(true) addEventHandler("onClientRender", root, Dx_Posto) end addEvent("DNL:Abrir_Posto_1", true) addEventHandler("DNL:Abrir_Posto_1", root, Abrir_Posto_1) function Abrir_Posto_2 () if isEventHandlerAdded("onClientRender", getRootElement(), Dx_Posto) then return end Refresh_Posto_2 () Veh_Posto:SetVisible(true) showCursor(true) addEventHandler("onClientRender", root, Dx_Posto) end addEvent("DNL:Abrir_Posto_2", true) addEventHandler("DNL:Abrir_Posto_2", root, Abrir_Posto_2) function Abrir_Posto_3 () if isEventHandlerAdded("onClientRender", getRootElement(), Dx_Posto) then return end Refresh_Posto_3 () Veh_Posto:SetVisible(true) showCursor(true) addEventHandler("onClientRender", root, Dx_Posto) end addEvent("DNL:Abrir_Posto_3", true) addEventHandler("DNL:Abrir_Posto_3", root, Abrir_Posto_3) function Abrir_Posto_4 () if isEventHandlerAdded("onClientRender", getRootElement(), Dx_Posto) then return end Refresh_Posto_4 () Veh_Posto:SetVisible(true) showCursor(true) addEventHandler("onClientRender", root, Dx_Posto) end addEvent("DNL:Abrir_Posto_4", true) addEventHandler("DNL:Abrir_Posto_4", root, Abrir_Posto_4) function Abrir_Posto_5 () if isEventHandlerAdded("onClientRender", getRootElement(), Dx_Posto) then return end Refresh_Posto_5 () Veh_Posto:SetVisible(true) showCursor(true) addEventHandler("onClientRender", root, Dx_Posto) end addEvent("DNL:Abrir_Posto_5", true) addEventHandler("DNL:Abrir_Posto_5", root, Abrir_Posto_5) function Abrir_Posto_6 () if isEventHandlerAdded("onClientRender", getRootElement(), Dx_Posto) then return end Refresh_Posto_6 () Veh_Posto:SetVisible(true) showCursor(true) addEventHandler("onClientRender", root, Dx_Posto) end addEvent("DNL:Abrir_Posto_6", true) addEventHandler("DNL:Abrir_Posto_6", root, Abrir_Posto_6) function Abrir_Posto_7 () if isEventHandlerAdded("onClientRender", getRootElement(), Dx_Posto) then return end Refresh_Posto_7 () Veh_Posto:SetVisible(true) showCursor(true) addEventHandler("onClientRender", root, Dx_Posto) end addEvent("DNL:Abrir_Posto_7", true) addEventHandler("DNL:Abrir_Posto_7", root, Abrir_Posto_7) function Abrir_Posto_8 () if isEventHandlerAdded("onClientRender", getRootElement(), Dx_Posto) then return end Refresh_Posto_8 () Veh_Posto:SetVisible(true) showCursor(true) addEventHandler("onClientRender", root, Dx_Posto) end addEvent("DNL:Abrir_Posto_8", true) addEventHandler("DNL:Abrir_Posto_8", root, Abrir_Posto_8) function Close_Posto () if isEventHandlerAdded("onClientRender", getRootElement(), Dx_Posto) then Veh_Posto:SetVisible(false) showCursor(false) removeEventHandler("onClientRender", root, Dx_Posto) end end addEvent("DNL:Close_Posto", true) addEventHandler("DNL:Close_Posto", root, Close_Posto) function Dx_Posto () exports["Blur"]:dxDrawBluredRectangle(x*470, y*184, x*427, y*397, tocolor(255, 255, 255, 255)) dxDrawRectangle(x*470, y*184, x*427, y*397, tocolor(0, 0, 0, 160), false) dxDrawRectangle(x*470, y*184, x*427, y*33, tocolor(0, 0, 0, 255), false) dxDrawLine(x*470, y*217, x*897, y*217, tocolor(255, 0, 0, 255), x*2, false) dxDrawText("Posto de Gasolina", x*633, y*191 +2, x*735, y*206, tocolor(255, 255, 255, 255), 1, Font_2, "center", "center", false, false, false, false, false) dxDrawText("Bem vindo ao posto de combustivel do nosso servidor", x*537, y*224, x*829, y*239, tocolor(255, 255, 255, 255), 1, Font_1, "center", "center", false, false, false, false, false) dxDrawText("Abasteça seu veiculo e não tente bular o sistema", x*548, y*243, x*819, y*258, tocolor(255, 255, 255, 255), 1, Font_1, "center", "center", false, false, false, false, false) dxDrawText("Seleciona o veiculo de acordo com o numero da bomba de combustivel", x*489, y*262, x*880, y*277, tocolor(255, 255, 255, 255), 1, Font_1, "center", "center", false, false, false, false, false) dxDrawText("O Litro de gasolina custa #00ff00$500", x*489, y*262 +38, x*880, y*277, tocolor(255, 255, 255, 255), 1, Font_1, "center", "center", false, false, false, true, false) dxDrawEditBox("Quantia de Gasolina", x*470, y*460, x*427, y*52, false, 3, Litro_Fuel) dxDrawImage(x*480, y*522, x*192, y*49, "Img/botao.png", 0, 0, 0, corAbastecer, false) dxDrawText("Abastecer", x*543, y*536, x*474, y*556, tocolor(255, 255, 255, 255), 1, Font_4, "left", "top", false, false, false, true, false) corAbastecer = tocolor(0, 255, 0, 150) if isCursorOnElement(x*480, y*522, x*192, y*49) then corAbastecer = tocolor(0, 255, 0, 255) end dxDrawImage(x*695, y*522, x*192, y*49, "Img/botao.png", 0, 0, 0, corCancelar, false) dxDrawText("Cancelar", x*762, y*536, x*474, y*556, tocolor(255, 255, 255, 255), 1, Font_4, "left", "top", false, false, false, true, false) corCancelar = tocolor(255, 0, 0, 150) if isCursorOnElement(x*695, y*522, x*192, y*49) then corCancelar = tocolor(255, 0, 0, 255) end end --addEventHandler("onClientRender", root, Dx_Posto) addEventHandler("onClientResourceStart", resourceRoot, function () Veh_Posto = dxGridW:Create(470, 303, 427, 157) Veh_Posto:AddColumn("Veiculos", 206) Veh_Posto:AddColumn("Bomba", 210) Veh_Posto:SetVisible(false) end) function refresh_1 (Name, ID_Mangueira) local ID_Mangueira = convertNumber(ID_Mangueira) Veh_Posto:AddItem(1, Name) Veh_Posto:AddItem(2, ID_Mangueira) end addEvent("DNL:Refresh_Lista_Posto1_C(Veiculos)", true) addEventHandler("DNL:Refresh_Lista_Posto1_C(Veiculos)", root, refresh_1) function refresh_2 (Name, ID_Mangueira) local ID_Mangueira = convertNumber(ID_Mangueira) Veh_Posto:AddItem(1, Name) Veh_Posto:AddItem(2, ID_Mangueira) end addEvent("DNL:Refresh_Lista_Posto2_C(Veiculos)", true) addEventHandler("DNL:Refresh_Lista_Posto2_C(Veiculos)", root, refresh_2) function refresh_3 (Name, ID_Mangueira) local ID_Mangueira = convertNumber(ID_Mangueira) Veh_Posto:AddItem(1, Name) Veh_Posto:AddItem(2, ID_Mangueira) end addEvent("DNL:Refresh_Lista_Posto3_C(Veiculos)", true) addEventHandler("DNL:Refresh_Lista_Posto3_C(Veiculos)", root, refresh_3) function refresh_4 (Name, ID_Mangueira) local ID_Mangueira = convertNumber(ID_Mangueira) Veh_Posto:AddItem(1, Name) Veh_Posto:AddItem(2, ID_Mangueira) end addEvent("DNL:Refresh_Lista_Posto4_C(Veiculos)", true) addEventHandler("DNL:Refresh_Lista_Posto4_C(Veiculos)", root, refresh_4) function refresh_5 (Name, ID_Mangueira) local ID_Mangueira = convertNumber(ID_Mangueira) Veh_Posto:AddItem(1, Name) Veh_Posto:AddItem(2, ID_Mangueira) end addEvent("DNL:Refresh_Lista_Posto5_C(Veiculos)", true) addEventHandler("DNL:Refresh_Lista_Posto5_C(Veiculos)", root, refresh_5) function refresh_6 (Name, ID_Mangueira) local ID_Mangueira = convertNumber(ID_Mangueira) Veh_Posto:AddItem(1, Name) Veh_Posto:AddItem(2, ID_Mangueira) end addEvent("DNL:Refresh_Lista_Posto6_C(Veiculos)", true) addEventHandler("DNL:Refresh_Lista_Posto6_C(Veiculos)", root, refresh_6) function refresh_7 (Name, ID_Mangueira) local ID_Mangueira = convertNumber(ID_Mangueira) Veh_Posto:AddItem(1, Name) Veh_Posto:AddItem(2, ID_Mangueira) end addEvent("DNL:Refresh_Lista_Posto7_C(Veiculos)", true) addEventHandler("DNL:Refresh_Lista_Posto7_C(Veiculos)", root, refresh_7) function refresh_8 (Name, ID_Mangueira) local ID_Mangueira = convertNumber(ID_Mangueira) Veh_Posto:AddItem(1, Name) Veh_Posto:AddItem(2, ID_Mangueira) end addEvent("DNL:Refresh_Lista_Posto8_C(Veiculos)", true) addEventHandler("DNL:Refresh_Lista_Posto8_C(Veiculos)", root, refresh_8) function Refresh_Posto_1 () Veh_Posto:Clear() Veh_Posto:SetSelectedItem (1) triggerServerEvent("DNL:Refresh_Lista_Posto1(Veiculos)", root, root, "") end function Refresh_Posto_2 () Veh_Posto:Clear() Veh_Posto:SetSelectedItem (1) triggerServerEvent("DNL:Refresh_Lista_Posto2(Veiculos)", root, root, "") end function Refresh_Posto_3 () Veh_Posto:Clear() Veh_Posto:SetSelectedItem (1) triggerServerEvent("DNL:Refresh_Lista_Posto3(Veiculos)", root, root, "") end function Refresh_Posto_4 () Veh_Posto:Clear() Veh_Posto:SetSelectedItem (1) triggerServerEvent("DNL:Refresh_Lista_Posto4(Veiculos)", root, root, "") end function Refresh_Posto_5 () Veh_Posto:Clear() Veh_Posto:SetSelectedItem (1) triggerServerEvent("DNL:Refresh_Lista_Posto5(Veiculos)", root, root, "") end function Refresh_Posto_6 () Veh_Posto:Clear() Veh_Posto:SetSelectedItem (1) triggerServerEvent("DNL:Refresh_Lista_Posto6(Veiculos)", root, root, "") end function Refresh_Posto_7 () Veh_Posto:Clear() Veh_Posto:SetSelectedItem (1) triggerServerEvent("DNL:Refresh_Lista_Posto7(Veiculos)", root, root, "") end function Refresh_Posto_8 () Veh_Posto:Clear() Veh_Posto:SetSelectedItem (1) triggerServerEvent("DNL:Refresh_Lista_Posto8(Veiculos)", root, root, "") end --[[ ><><><><><><><><><><><><><><>< >< Clicks >< ><><><><><><><><><><><><><><>< --]] function Click_Abastecer ( _,state ) local getQuantia = tonumber(getElementData(Litro_Fuel, "text")) if isEventHandlerAdded("onClientRender", getRootElement(), Dx_Posto) then if state == "down" then if isCursorOnElement ( x*480, y*522, x*192, y*49 ) then -- Abastecer Veiculo local SelectVeiculo = Veh_Posto:GetSelectedItem() local Nome_Veh = Veh_Posto:GetItemDetails(1, SelectVeiculo) local Id_Veh = Veh_Posto:GetItemDetails(2, SelectVeiculo) if SelectVeiculo > -1 then if type(getQuantia) == "number" then if getQuantia >= 1 then playSoundFrontEnd ( 4 ) Refresh_Posto_1 () Refresh_Posto_2 () Refresh_Posto_3 () Refresh_Posto_4 () Refresh_Posto_5 () Refresh_Posto_6 () Refresh_Posto_7 () Refresh_Posto_8 () Close_Posto () triggerServerEvent("DNL:Abastecer_Veiculo", root, localPlayer, Nome_Veh, Id_Veh, getQuantia) else playSoundFrontEnd ( 6 ) outputChatBox ( "#00ff00⇨? #ff0000INFO #00ff00⇨? #ffffffQuantia Minima #00ff00( #ffffffR$1 #00ff00)", 231, 217, 176, true ) end else playSoundFrontEnd ( 6 ) outputChatBox ( "#00ff00⇨? #ff0000BPS #00ff00⇨? #ffffffVocê esqueceu de por o a quantia de gasolina.", 231, 217, 176, true ) end end elseif isCursorOnElement ( x*695, y*522, x*192, y*49 ) then -- Fechar Painel playSoundFrontEnd ( 4 ) Close_Posto () end end end end addEventHandler ( "onClientClick", root, Click_Abastecer ) --=============================-- ------------- IGNORA ------------ --=============================-- function convertNumber ( number ) local formatted = number while true do formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2') if ( k==0 ) then break end end return formatted end addEventHandler("onClientResourceStart", resourceRoot, function () txd = engineLoadTXD("Txd/Mangueira.txd", 14463 ) engineImportTXD(txd, 14463) dff = engineLoadDFF("Txd/Mangueira.dff", 14463 ) engineReplaceModel(dff, 14463) end) function isEventHandlerAdded( sEventName, pElementAttachedTo, func ) if type( sEventName ) == 'string' and isElement( pElementAttachedTo ) and type( func ) == 'function' then local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo ) if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then for i, v in ipairs( aAttachedFunctions ) do if v == func then return true end end end end return false end local x,y = guiGetScreenSize() function isCursorOnElement(x, y, w, h) if (not isCursorShowing()) then return false end local mx, my = getCursorPosition() local fullx, fully = guiGetScreenSize() cursorx, cursory = mx*fullx, my*fully if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then return true else return false end end tick9 = getTickCount() function Img_Markers () local Op1, Op2 = interpolateBetween(0.4, 1.4, 0, 0.7, 1.7, 0, ((getTickCount() - tick9) / 1500), "SineCurve") local Op3, Op4, Op5 = interpolateBetween(1.21, 1.2, 2.5, 1.22, 1.3, 2.6, ((getTickCount() - tick9) / 1500), "SineCurve") local px, py, pz, l1, l2, l3, dist local px, py, pz = getCameraMatrix( ) for _, h in ipairs( getElementsByType 'marker' ) do if getElementData(h, "Posto:Gasolina", true) then local l1, l2, l3 = getElementPosition( h ) local dist = math.sqrt( ( px + l1 ) ^ 0 + ( py + l2 ) ^ 0 + ( pz + l3 ) ^ 0 ) if dist < 20 then if isLineOfSightClear( px, py, pz, l1, l2, l3, false, false, true, true, false, false, false,localPlayer ) then local x,y = getScreenFromWorldPosition( l1, l2, l3 ) if x then if getElementData(h, "Bomba") == "Ocupada" then dxDrawMaterialLine3D (l1, l2, l3 + Op1, l1, l2, l3 + Op2, Bomba, 1, tocolor(255, 0, 0, 255)) else dxDrawMaterialLine3D (l1, l2, l3 + Op1, l1, l2, l3 + Op2, Bomba, 1, tocolor(0, 255, 0, 255)) end dxDrawMaterialLine3D (l1, l2 - Op3, l3 + 0.03, l1, l2 + Op4, l3+0.03, Marcador, Op5, tocolor(255,255,255,255),0,0,-1730900) end end end end end end addEventHandler( "onClientRender",root, Img_Markers) function Img_Setas_Bomber () local Op1, Op2 = interpolateBetween(0.4, 1.4, 0, 0.7, 1.7, 0, ((getTickCount() - tick9) / 1500), "SineCurve") local px, py, pz, l1, l2, l3, dist local px, py, pz = getCameraMatrix( ) for _, h in ipairs( getElementsByType 'marker' ) do if getElementData(h, "Bomba:Gasolina", true) then local l1, l2, l3 = getElementPosition( h ) local dist = math.sqrt( ( px + l1 ) ^ 0 + ( py + l2 ) ^ 0 + ( pz + l3 ) ^ 0 ) if dist < 20 then if isLineOfSightClear( px, py, pz, l1, l2, l3, false, false, true, true, false, false, false,localPlayer ) then local x,y = getScreenFromWorldPosition( l1, l2, l3 ) if x then if getElementData(h, "Mangueira_Acionada") == true then dxDrawMaterialLine3D (l1, l2, l3 + Op1, l1, l2, l3 + Op2, Seta, 1, tocolor(255, 0, 0, 255)) else dxDrawMaterialLine3D (l1, l2, l3 + Op1, l1, l2, l3 + Op2, Seta, 1, tocolor(0, 255, 0, 255)) end end end end end end end addEventHandler( "onClientRender",root, Img_Setas_Bomber) function Img_Setas_Corona () local Op1, Op2 = interpolateBetween(0.1, 1, 0, 0.4, 1.3, 0, ((getTickCount() - tick9) / 1500), "SineCurve") local px, py, pz, l1, l2, l3, dist local px, py, pz = getCameraMatrix( ) for _, h in ipairs( getElementsByType 'marker' ) do if getElementData(h, "Tanque_Fuel") == true then local l1, l2, l3 = getElementPosition( h ) local dist = math.sqrt( ( px + l1 ) ^ 0 + ( py + l2 ) ^ 0 + ( pz + l3 ) ^ 0 ) if dist < 20 then if isLineOfSightClear( px, py, pz, l1, l2, l3, false, false, true, true, false, false, false,localPlayer ) then local x,y = getScreenFromWorldPosition( l1, l2, l3 ) if x then for _, veh in ipairs( getElementsByType 'vehicle' ) do if getElementData(veh, "Aguardando_Gasolina") == true then if getElementData(veh, "Mangueira_Veiculo") == false then if getElementData(localPlayer, "Mangueira_Mão") == true then dxDrawMaterialLine3D (l1, l2, l3 + Op1, l1, l2, l3 + Op2, Seta_Mangueira, 1, tocolor(0, 255, 0, 255)) end end end end end end end end end end addEventHandler( "onClientRender",root, Img_Setas_Corona) function Img_Setas_Mangueira () local Op1, Op2 = interpolateBetween(0.1, 1, 0, 0.4, 1.3, 0, ((getTickCount() - tick9) / 1500), "SineCurve") local px, py, pz, l1, l2, l3, dist local px, py, pz = getCameraMatrix( ) for _, h in ipairs( getElementsByType 'object' ) do if getElementData(h, "Mangueira:Gasolina") == true then local l1, l2, l3 = getElementPosition( h ) local dist = math.sqrt( ( px + l1 ) ^ 0 + ( py + l2 ) ^ 0 + ( pz + l3 ) ^ 0 ) if dist < 20 then if isLineOfSightClear( px, py, pz, l1, l2, l3, false, false, true, true, false, false, false,localPlayer ) then local x,y = getScreenFromWorldPosition( l1, l2, l3 ) if x then for _, veh in ipairs( getElementsByType 'vehicle' ) do if getElementData(h, "Combustivel_Cheio") == true then dxDrawMaterialLine3D (l1, l2, l3 + Op1, l1, l2, l3 + Op2, Seta_Mangueira, 1, tocolor(255, 0, 0, 255)) else dxDrawMaterialLine3D (l1, l2, l3 + Op1, l1, l2, l3 + Op2, Seta_Mangueira, 1, tocolor(0, 255, 0, 255)) end end end end end end end end addEventHandler( "onClientRender",root, Img_Setas_Mangueira) function LineDX () if getElementData(localPlayer, "Mangueira_Mão") == true then local Mangueira1 = getElementData(localPlayer, "Pos_Mangueira(1)") or 0 -- Pos Mangueira X local Mangueira2 = getElementData(localPlayer, "Pos_Mangueira(2)") or 0 -- Pos Mangueira Y local Mangueira3 = getElementData(localPlayer, "Pos_Mangueira(3)") or 0 -- Pos Mangueira Z playersX, playersY, playersZ = getPedBonePosition(localPlayer, 25) dxDrawLine3D (Mangueira1, Mangueira2, Mangueira3, playersX, playersY, playersZ, tocolor ( 0,0,0,255 ), 1.5) else setElementData(localPlayer, "Pos_Mangueira(1)", 0) setElementData(localPlayer, "Pos_Mangueira(2)", 0) setElementData(localPlayer, "Pos_Mangueira(3)", 0) playersX, playersY, playersZ = 0, 0, 0 end local vehicles = getElementsByType ( "vehicle" ) for _, veiculos in ipairs( vehicles ) do if getElementData(veiculos, "Mangueira_Veiculo") == true then local MangueiraPlayer1 = getElementData(veiculos, "Pos_MangueiraPlayer(1)") or 0 -- Pos Mangueira X local MangueiraPlayer2 = getElementData(veiculos, "Pos_MangueiraPlayer(2)") or 0 -- Pos Mangueira Y local MangueiraPlayer3 = getElementData(veiculos, "Pos_MangueiraPlayer(3)") or 0 -- Pos Mangueira Z local Mangueira1 = getElementData(veiculos, "Pos_Mangueira(1)") or 0 -- Pos Mangueira X local Mangueira2 = getElementData(veiculos, "Pos_Mangueira(2)") or 0 -- Pos Mangueira Y local Mangueira3 = getElementData(veiculos, "Pos_Mangueira(3)") or 0 -- Pos Mangueira Z dxDrawLine3D (Mangueira1, Mangueira2, Mangueira3, MangueiraPlayer1, MangueiraPlayer2, MangueiraPlayer3, tocolor ( 0,0,0,255 ), 1.5) else setElementData(veiculos, "Pos_Mangueira(1)", 0) setElementData(veiculos, "Pos_Mangueira(2)", 0) setElementData(veiculos, "Pos_Mangueira(3)", 0) setElementData(veiculos, "Pos_MangueiraPlayer(1)", 0) setElementData(veiculos, "Pos_MangueiraPlayer(2)", 0) setElementData(veiculos, "Pos_MangueiraPlayer(3)", 0) end end end addEventHandler("onClientRender", root, LineDX) --[[ /\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\/ Curta a Minha Página <3 https://www.facebook.com/danilinmtascr/ ::::::::: ::: :::: ::: ::::::::::: ::: ::::::::::: :::: ::: :+: :+: :+: :+: :+:+: :+: :+: :+: :+: :+:+: :+: +:+ +:+ +:+ +:+ :+:+:+ +:+ +:+ +:+ +:+ :+:+:+ +:+ +#+ +:+ +#++:++#++: +#+ +:+ +#+ +#+ +#+ +#+ +#+ +:+ +#+ +#+ +#+ +#+ +#+ +#+ +#+#+# +#+ +#+ +#+ +#+ +#+#+# #+# #+# #+# #+# #+# #+#+# #+# #+# #+# #+# #+#+# ######### ### ### ### #### ########### ########## ########### ### #### /\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\/ --]] -- ATENÇÃO É POSSIVEL DA WANING NA LINHA 295, NÃO INTERFERE EM NADA -- -- ##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@## -- -- ## PRESTE ATENÇÃO NA MENSAGEM ABAIXO ## -- -- ##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@## -- --[[ As cordenadas abaixo funciona da seguinte forma 1, 2, 3: Posição do marker onde o veiculo deve entrar 4, 5, 6: Posição da bomba onde o jogador vai pegar a mangueira 7, 8, 9, 10: Posição e rotação do veiculo 11, 12, 13: Posição da onde irá criar a linha da mangueira (Adicione uns centimetro pra dentro da bomba do posto 14, 15, 16: Posição da onde o jogador vai ter que ir pra por a mangueira no veiculo Deixei as posição com espaço para que você não fique perdido --]] -- 1 2 3 4 5 Bombas_Combustivel = { {1938.35266, -1778.71985, 13.38281, 1940.72449, -1778.48633, 13.39060, 1938.35266, -1778.71985, 13.38281, 0, 1941.72046, -1778.48376, 14.39060, 1939.68616, -1780.47058, 13.39060}, -- Bomba 1 {1938.33154, -1767.38000, 13.38281, 1940.72351, -1767.32568, 13.39060, 1938.33154, -1767.38000, 13.38281, 0, 1941.72351, -1767.32568, 14.39060, 1939.66479, -1769.13367, 13.38281}, -- Bomba 2 {1944.55579, -1778.50830, 13.39060, 1942.60840, -1778.49207, 13.39060, 1944.55579, -1778.50830, 13.39060, 180, 1941.72046, -1778.48376, 14.39060, 1943.12683, -1777.12988, 13.39060}, -- Bomba 3 {1944.43140, -1767.24988, 13.38281, 1942.61975, -1767.30859, 13.39060, 1944.43140, -1767.24988, 13.38281, 180, 1941.72351, -1767.32568, 14.39060, 1942.98450, -1765.54785, 13.39060}, -- Bomba 4 {1007.95508, -939.53308, 42.17969, 1007.63916, -937.28809, 42.17969, 1007.95508, -939.53308, 42.17969, 90, 1007.53247, -936.54156, 43.32813, 1009.70935, -938.19427, 42.17969}, -- Bomba 5 {1000.30652, -940.79962, 42.17969, 999.94574, -938.33441, 42.17969, 1000.30652, -940.79962, 42.17969, 90, 999.83368, -937.65015, 42.32813, 1001.94476, -939.39429, 42.17969}, -- Bomba 6 {1006.94489, -933.30310, 42.17969, 1007.25824, -935.42303, 42.17969, 1006.94489, -933.30310, 42.17969, 270, 1007.53247, -936.54156, 43.32813, 1005.21942, -934.65991, 42.17969}, -- Bomba 7 {999.42529, -934.40009, 42.17969, 999.77362, -936.40533, 42.17969, 999.42529, -934.40009, 42.17969, 270, 999.83368, -937.65015, 42.32813, 997.68323, -935.75867, 42.17969}, -- Bomba 8 {2108.7233886719,928.56799316406,10.8203125, 2109.0913085938,926.48986816406,10.8203125, 2108.7233886719,928.56799316406,10.8203125, 272, 2109.0913085938,926.48986816406,10.8203125, 2107.3334960938,927.07470703125,10.8203125}, -- Bomba 9 {2120.5671386719,928.55401611328,10.8203125, 2120.7333984375,926.29040527344,10.8203125, 2120.5671386719,928.55401611328,10.8203125, 272, 2120.7333984375,926.29040527344,10.8203125, 2118.8334960938,927.06066894531,10.8203125}, -- Bomba 10 {2121.2634277344,922.31982421875,10.8203125, 2120.8745117188,924.77770996094,10.8203125, 2121.2634277344,922.31982421875,10.8203125, 89, 2120.8745117188,924.77770996094,10.8203125, 2122.587890625,923.97540283203,10.8203125}, -- Bomba 11 {2109.3947753906,922.3515625,10.8203125, 2109.0830078125,924.81390380859,10.943323135376, 2109.3947753906,922.3515625,10.8203125, 89, 2109.0830078125,924.81390380859,10.943323135376, 2110.9479980469,923.97796630859,10.8203125}, -- Bomba 12 {2199.976, 2470.197, 10.82, 2197.648, 2470.332, 10.995, 2199.976, 2470.197, 10.82, 181, 2197.648, 2470.332, 10.995, 2198.661, 2471.425, 10.82}, -- Bomba 13 {2199.669, 2480.564, 10.82, 2197.524, 2480.329, 10.995, 2199.669, 2480.564, 10.82, 181, 2197.524, 2480.329, 10.995, 2198.354, 2482.204, 10.82}, -- Bomba 14 {2205.198, 2480.27, 10.82, 2207.116, 2480.281, 10.995, 2205.198, 2480.27, 10.82, 0.14, 2207.116, 2480.281, 10.995, 2206.673, 2478.743, 10.82}, -- Bomba 15 {2204.912, 2470.237, 10.82, 2207.111, 2470.26, 10.995, 2204.912, 2470.237, 10.82, 0.14, 2207.111, 2470.26, 10.995, 2206.375, 2468.653, 10.82}, -- Bomba 16 {-2023.125, 159.376, 28.836, -2025.729, 159.067, 29.039, -2023.125, 159.376, 28.836, 182, -2025.729, 159.067, 29.039, -2024.625, 161.064, 28.836}, -- Bomba 17 {-2022.874, 153.091, 28.836, -2025.865, 154.423, 29.039, -2022.874, 153.091, 28.836, 182, -2025.865, 154.423, 29.039, -2024.335, 154.925, 28.836}, -- Bomba 18 {-2029.62, 154.267, 28.836, -2027.212, 154.322, 29.039, -2029.62, 154.267, 28.836, 2.022, -2027.212, 154.322, 29.039, -2028.142, 152.323, 28.836}, -- Bomba 19 {-2029.47, 159.005, 28.836, -2027.214, 159.07, 29.039, -2029.47, 159.005, 28.836, 2.022, -2027.214, 159.07, 29.039, -2027.964, 157.358, 28.836}, -- Bomba 20 {-2406.309, 981.981, 45.297, -2409.958, 981.538, 45.402, -2406.309, 981.981, 45.297, 181, -2409.958, 981.538, 45.402, -2407.791, 983.524, 45.297}, -- Bomba 21 {-2406.342, 971.37, 45.297, -2410.024, 970.807, 45.422, -2406.342, 971.37, 45.297, 181, -2410.024, 970.807, 45.422, -2407.796, 973.152, 45.297}, -- Bomba 22 {-2415.353, 970.581, 45.297, -2411.844, 970.861, 45.434, -2415.353, 970.581, 45.297, 359.642, -2411.844, 970.861, 45.434, -2413.939, 968.776, 45.297}, -- Bomba 23 {-2415.099, 981.033, 45.297, -2411.802, 981.546, 45.447, -2415.099, 981.033, 45.297, 359.642, -2411.802, 981.546, 45.447, -2413.656, 979.392, 45.297}, -- Bomba 24 {-1598.664, -2705.528, 48.539, -1600.196, -2707.168, 48.539, -1598.664, -2705.528, 48.539, 230.361, -1600.196, -2707.168, 48.539, -1600.859, -2705.596, 48.539}, -- Bomba 25 {-1602.305, -2709.998, 48.539, -1603.461, -2711.639, 48.533, -1602.305, -2709.998, 48.539, 230.361, -1603.461, -2711.639, 48.533, -1604.487, -2710.082, 48.533}, -- Bomba 26 {-1605.235, -2714.753, 48.533, -1606.785, -2716.029, 48.539, -1605.235, -2714.753, 48.533, 230.361, -1606.785, -2716.029, 48.539, -1607.583, -2714.617, 48.539}, -- Bomba 27 {-1608.65, -2719.327, 48.539, -1610.095, -2720.43, 48.539, -1608.65, -2719.327, 48.539, 230.361, -1610.095, -2720.43, 48.539, -1610.896, -2719.343, 48.539}, -- Bomba 28 {-1326.597, 2688.633, 50.063, -1326.945, 2686.39, 50.063, -1326.597, 2688.633, 50.063, 263.188, -1326.945, 2686.39, 50.063, -1328.41, 2687.231, 50.063}, -- Bomba 29 {-1326.996, 2682.932, 50.063, -1327.739, 2680.924, 50.063, -1326.996, 2682.932, 50.063, 263.188, -1327.739, 2680.924, 50.063, -1329.051, 2681.603, 50.063}, -- Bomba 30 {-1327.781, 2677.351, 50.063, -1328.437, 2675.479, 50.063, -1327.781, 2677.351, 50.063, 263.188, -1328.437, 2675.479, 50.063, -1329.833, 2676.023, 50.063}, -- Bomba 31 {-1328.286, 2672.056, 50.063, -1329.033, 2670.041, 50.063, -1328.286, 2672.056, 50.063, 263.188, -1329.033, 2670.041, 50.063, -1330.426, 2670.701, 50.063}, -- Bomba 32 } -- ##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@## -- -- ## PRESTE ATENÇÃO NA MENSAGEM ABAIXO ## -- -- ##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@## -- --[[ As cordenadas abaixo funciona da seguinte forma (Cordenadas de area e posição Jogador) 1, 2 -- Posição da area protetora 3, 4 -- Tamanho da arena 5, 6, 7 -- Posição do jogador --]] Areas_Protetoras = { {1932.56592, -1787.22266, 25, 35, 1933.71887, -1772.50146, 13.38281}, -- Proteção Posto 1 {992.93976, -945.28442, 35, 25, 1002.98242, -934.05566, 42.17969}, -- Proteção Posto 2 {-1342.733, 2657.057, 25, 35, -1324.045, 2679.647, 50.063}, -- Proteção Posto 3 {-2445.653, 950.818, 45, 45, -2410.685, 974.673, 45.461}, -- Proteção Posto 4 {-2045.5, 127.567, 45, 45, -2026.533, 157.022, 29.039}, -- Proteção Posto 5 {-1626.495, -2743.427, 45, 45, -1601.289, -2714.605, 48.539}, -- Proteção Posto 6 {2094.87, 869.627, 45, 80, 2114.933, 927.064, 10.82}, -- Proteção Posto 7 {2180.718, 2444.167, 45, 80, 2202.688, 2475.461, 10.82}, -- Proteção Posto 8 } local Veiculos = { 581, 462, 521, 463, 522, 461, 448, 468, 586, 602, 496, 401, 518, 527, 589, 419, 587, 533, 526, 474, 545, 517, 410, 600, 436, 439, 549, 491, 445, 604, 507, 585, 466, 492, 546, 551, 516, 467, 426, 547, 405, 580, 409, 550, 566, 540, 421, 529, 485, 431, 438, 437, 574, 420, 525, 408, 552, 416, 433, 427, 490, 528, 407, 544, 523, 470, 596, 598, 599, 597, 428, 499, 609, 498, 524, 532, 578, 486, 406, 573, 455, 588, 423, 414, 443, 531, 456, 459, 422, 482, 605, 530, 418, 572, 582, 413, 440, 543, 483, 478, 554, 579, 400, 404, 489, 505, 479, 442, 458, 536, 575, 534, 567, 535, 576, 412, 402, 542, 603, 475, 429, 541, 415, 480, 562, 565, 434, 494, 502, 503, 411, 559, 561, 560, 506, 451, 558, 555, 477, 568, 424, 504, 457, 483, 508, 571, 500, 444, 556, 557, 471, 495, 539 } MarkersTable = {} BomberTable = {} Mangueira = {} TampaCombustivel = {} TableMangueira_Veh = {} Tempo = {} Areas = {} function getVehicleByID(id) v = false for i, vehicle in ipairs (getElementsByType("vehicle")) do if getElementData(vehicle, "ID_Mangueira") == id then v = vehicle break end end return v end --[[ ><><><><><><><><><><><><><><><>< >< Anti_Bugs Area >< ><><><><><><><><><><><><><><><>< --]] function HitPlayerArea (source) for i, areacol in ipairs (Areas) do local ID_Area = getElementData(areacol, "ID_Area") or 0 if getElementData(areacol, "Area_Protetora") == true then if isElementWithinColShape(source, areacol) then setElementData(source, "ID_Area", ID_Area) end end end end function Block_Area (source) for i, areacol in ipairs (Areas) do local ID_Area = getElementData(areacol, "ID_Area") or 0 if getElementData(areacol, "Area_Protetora") == true then if getElementData(source, "ID_Area") == ID_Area then local Kick1 = getElementData(areacol, "Pos_Kick(1)") or 0 -- Pos Kick X local Kick2 = getElementData(areacol, "Pos_Kick(2)") or 0 -- Pos Kick Y local Kick3 = getElementData(areacol, "Pos_Kick(3)") or 0 -- Pos Kick Z if getElementData(source, "Mangueira_Mão") == true then outputChatBox ( "#00ff00✘ #ffffffINFO #00ff00✘➺ #ffffffVocê não pode sair do posto Com mangueira em mãos.", source, 255,255,255, true) setElementPosition(source, Kick1, Kick2, Kick3) else setElementData(source, "ID_Area", false) end end end end end --[[ ><><><><><><><><><><><><><><><><><>< >< Veiculo Hit Marker >< ><><><><><><><><><><><><><><><><><>< --]] function Vehicle_HitM (theVehicle) if getElementType(theVehicle) == "vehicle" then -- O Elemento a Colidir é um veiculo for i, Marker in ipairs (MarkersTable) do -- Loop Dos Markes De Gasolina if getElementData(Marker, "Posto:Gasolina") == true then -- Verifica se o Marker é um Posto if isElementWithinMarker(theVehicle, Marker) then -- Verifica se o Veiculo está dentro do Marker if getElementData(Marker, "Bomba") == false then -- verifica se não tem veiculo na bomba for _, players in ipairs( getElementsByType 'player' ) do -- Verifica Todos jogadores Online local Vehicle = getPedOccupiedVehicle ( players ) -- Verifica o Veiculo que os Jogadores estão Ocupando if ( Vehicle ) then -- Verificação for _, veh in ipairs ( Veiculos ) do local ID_Veh = getElementModel ( Vehicle ) if ID_Veh == veh then if getPedOccupiedVehicleSeat ( players ) == 0 then -- Verifica se o Jogador é Motorista bindKey (players, "k", "down", Perm_Abastercer ) -- Da a permissão pro jogador Seguir em frente com o abastecimento outputChatBox ( "#00ff00⇨? #ff0000Posto #00ff00⇨? #ffffffAperte a Letra #00ff00'K' #ffffffPara Que Possa Abastecer Seu Veiculo.", players, 255, 255, 255, true ) end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim --[[ ><><><><><><><><><><><><><><><><><><>< >< Veiculo Leave Marker >< ><><><><><><><><><><><><><><><><><><>< --]] function Vehicle_LeaveM (theVehicle) if getElementType(theVehicle) == "vehicle" then -- O Elemento a Colidir deve ser Veiculo for _, Bombas in ipairs( getElementsByType 'marker' ) do -- Verifica todos os marker do jogo if getElementData(Bombas, "Posto:Gasolina") == true then -- Verifica se o marker e um posto de gasolina if getElementData(theVehicle, "Decidir") == "Abastecer?" then -- Verifica se o veiculo está em modo decisão for _, players in ipairs( getElementsByType 'player' ) do -- Todos jogadores online local Vehicle = getPedOccupiedVehicle ( players ) -- Verifica veiculo de todos os jogadores if ( Vehicle ) then -- Verificação if getElementData(Vehicle, "Decidir") == "Abastecer?" then -- Verifica se o Carro do Jogador está em modo decidir if getPedOccupiedVehicleSeat ( players ) == 0 then -- Verifica se é o motorista unbindKey (players, "k", "down", Perm_Abastercer ) -- Remove a bind de abastecer unbindKey (players, "k", "down", Sair_Veh ) -- Remove bind sair end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim for ia, va in ipairs (Areas_Protetoras) do Areas[ia] = createColRectangle (va[1], va[2], va[3], va[4]) setElementData(Areas[ia], "Area_Protetora", true) setElementData(Areas[ia], "Pos_Kick(1)", va[5]) setElementData(Areas[ia], "Pos_Kick(2)", va[6]) setElementData(Areas[ia], "Pos_Kick(3)", va[7]) setElementData(Areas[ia], "ID_Area", ia) addEventHandler("onColShapeHit", Areas[ia], HitPlayerArea) addEventHandler ( "onColShapeLeave", Areas[ia], Block_Area ) end for i, v in ipairs (Bombas_Combustivel) do MarkersTable[i] = createMarker ( v[1], v[2], v[3] -1, "cylinder", 1.7, 0, 255, 0, 0 ) setElementData(MarkersTable[i], "Posto:Gasolina", true) setElementData(MarkersTable[i], "Pos_Bomber(1)", v[4]) setElementData(MarkersTable[i], "Pos_Bomber(2)", v[5]) setElementData(MarkersTable[i], "Pos_Bomber(3)", v[6]) setElementData(MarkersTable[i], "Pos_Car(1)", v[7]) setElementData(MarkersTable[i], "Pos_Car(2)", v[8]) setElementData(MarkersTable[i], "Pos_Car(3)", v[9]) setElementData(MarkersTable[i], "Rot_Car", v[10]) setElementData(MarkersTable[i], "Pos_Mangueira(1)", v[11]) setElementData(MarkersTable[i], "Pos_Mangueira(2)", v[12]) setElementData(MarkersTable[i], "Pos_Mangueira(3)", v[13]) setElementData(MarkersTable[i], "Pos_Tampa(1)", v[14]) setElementData(MarkersTable[i], "Pos_Tampa(2)", v[15]) setElementData(MarkersTable[i], "Pos_Tampa(3)", v[16]) setElementData(MarkersTable[i], "ID_Bomba", i) addEventHandler("onMarkerHit", MarkersTable[i], Vehicle_HitM) addEventHandler("onMarkerLeave", MarkersTable[i], Vehicle_LeaveM) end --[[ ><><><><><><><><><><><><><><><><><><> >< Permissão Abastecer >< ><><><><><><><><><><><><><><><><><><> --]] function Perm_Abastercer (source) for i, Marker in ipairs (MarkersTable) do -- Verifica Todos os Markers Criados local Bomber1 = getElementData(Marker, "Pos_Bomber(1)") or 0 -- Pos Bomba X local Bomber2 = getElementData(Marker, "Pos_Bomber(2)") or 0 -- Pos Bomba Y local Bomber3 = getElementData(Marker, "Pos_Bomber(3)") or 0 -- Pos Bomba Z local Pos_Car1 = getElementData(Marker, "Pos_Car(1)") or 0 -- Pos Car X local Pos_Car2 = getElementData(Marker, "Pos_Car(2)") or 0 -- Pos Car Y local Pos_Car3 = getElementData(Marker, "Pos_Car(3)") or 0 -- Pos Car Z local Rot_Car = getElementData(Marker, "Rot_Car") or 0 -- Root Car local Mangueira1 = getElementData(Marker, "Pos_Mangueira(1)") or 0 -- Pos Mangueira X local Mangueira2 = getElementData(Marker, "Pos_Mangueira(2)") or 0 -- Pos Mangueira Y local Mangueira3 = getElementData(Marker, "Pos_Mangueira(3)") or 0 -- Pos Mangueira Z local Pos_Tampa1 = getElementData(Marker, "Pos_Tampa(1)") or 0 -- Pos Mangueira Z local Pos_Tampa2 = getElementData(Marker, "Pos_Tampa(2)") or 0 -- Pos Mangueira Z local Pos_Tampa3 = getElementData(Marker, "Pos_Tampa(3)") or 0 -- Pos Mangueira Z local Vehicle = getPedOccupiedVehicle ( source ) -- Verifica Veiculo do Jogador if ( Vehicle ) then -- Verificação for _, veh in ipairs ( Veiculos ) do local ID_Veh = getElementModel ( Vehicle ) if ID_Veh == veh then if isElementWithinMarker(Vehicle, Marker) then -- Verifica se o Veiculo Está dentro do Marker if BomberTable[Vehicle] and isElement( BomberTable[Vehicle] ) then destroyElement ( BomberTable[Vehicle] ) BomberTable[Vehicle] = nil end -- Destroi bombar veiculo if TampaCombustivel[Vehicle] and isElement( TampaCombustivel[Vehicle] ) then destroyElement ( TampaCombustivel[Vehicle] ) TampaCombustivel[Vehicle] = nil end -- Destroi tampa veiculo BomberTable[Vehicle] = createMarker ( Bomber1, Bomber2, Bomber3 -1, "cylinder", 1.1, 0, 255, 0, 0 ) -- Cria Bomba pra Abastecer addEventHandler("onMarkerHit", BomberTable[Vehicle], Confirmar_Abastecimento) -- Adiciona Evento nos Marker de Abastecimento setElementData(Marker, "Bomba", "Ocupada") -- Seta a Bomba do Posto "Ocupada" setElementData(BomberTable[Vehicle], "Bomba:Gasolina", true) -- Dar valor A Bomba de abastecimento setElementData(BomberTable[Vehicle], "Pos_Mangueira(1)", Mangueira1) -- Seta Posição Line (X) setElementData(BomberTable[Vehicle], "Pos_Mangueira(2)", Mangueira2) -- Seta Posição Line (Y) setElementData(BomberTable[Vehicle], "Pos_Mangueira(3)", Mangueira3) -- Seta Posição Line (Z) setElementFrozen(Vehicle, true) -- Trava o Veiculo setElementPosition(Vehicle, Pos_Car1, Pos_Car2, Pos_Car3 -0.2) -- Seta Posição~ do Veiculo setElementRotation(Vehicle, 0, 0, Rot_Car) -- Setar Rotação do Veiculo setElementData(Vehicle, "Aguardando_Gasolina", true) -- Seta Veiculo Aguardando Abastecimento unbindKey (source, "k", "down", Perm_Abastercer ) -- Remove a bind de abastecer bindKey (source, "k", "down", Sair_Veh ) -- Adiciona bind sair TampaCombustivel[Vehicle] = createMarker ( Pos_Tampa1, Pos_Tampa2, Pos_Tampa3, "corona", 1.3, 0, 255, 0, 0 ) -- Cria Bomba pra Abastecer setElementData(TampaCombustivel[Vehicle], "Tanque_Fuel", true) -- Seta Tanque_Fuel no Veiculo addEventHandler("onMarkerHit", TampaCombustivel[Vehicle], Mensagem_Veh) -- Adiciona Evento nos Marker de Abastecimento outputChatBox ( "#00ff00⇨? #ff0000Posto #00ff00⇨? #ffffffSaia do Veiculo e Vá Até a Bomba de Combustivel.", source, 255, 255, 255, true ) outputChatBox ( "#00ff00⇨? #ff0000Posto #00ff00⇨? #ffffffAperte #00ff00'K' #ffffffPara que saia com seu veiculo.", source, 255, 255, 255, true ) end end end end end end function Sair_Veh (source) for i, v in ipairs (MarkersTable) do -- Faz um loop com todos os marker na tabela MarkersTable local Vehicle = getPedOccupiedVehicle ( source ) -- Verifica o veiculo que o jogador está conduzindo if ( Vehicle ) then -- Verificação if isElementWithinMarker(Vehicle, v) then -- Verifica se o veiculo está em algum posto if (BomberTable[Vehicle]) and isElement(BomberTable[Vehicle]) then destroyElement(BomberTable[Vehicle]) end -- Destroi bomba if TampaCombustivel[Vehicle] and isElement( TampaCombustivel[Vehicle] ) then destroyElement ( TampaCombustivel[Vehicle] ) TampaCombustivel[Vehicle] = nil end -- Destroi tampa de adicionar gasolina setElementFrozen(Vehicle, false) -- Destrava o veiculo setElementData(v, "Bomba", false) -- Adiciona a Bomba como desocupada unbindKey (source, "k", "down", Sair_Veh ) -- Remove bind setElementData(Vehicle, "Aguardando_Gasolina", false) -- Remove o carro como aguardando gasolina setElementData(Vehicle, "Mangueira_Veiculo", false) -- Remove a Mangueira do Veiculo setElementData(Vehicle, "Abastecendo", false) -- Adiciona o veiculo como abastecendo end -- Fim end -- Fim end -- Fim end -- Fim function Enter_Vehicle (source) local Vehicle = getPedOccupiedVehicle ( source ) -- Verifica o veiculo que o jogador está conduzindo if ( Vehicle ) then -- Verificação if getElementData(Vehicle, "Aguardando_Gasolina") == true then -- Veiculo precisa está aguardando gasolina if getElementData(Vehicle, "Mangueira_Veiculo") == false then -- O veiculo não pode está com mangueira acionada nele bindKey (source, "k", "down", Sair_Veh ) -- adiciona bindkey pra sair com veiiculo outputChatBox ( "#00ff00⇨? #ff0000Posto #00ff00⇨? #ffffffAperte #00ff00'K' #ffffffPara que saia com seu veiculo.", source, 255, 255, 255, true ) else -- Ou se o veiculo estiver com mangueira envia a mensagem abaixo outputChatBox ( "#00ff00⇨? #ff0000Posto #00ff00⇨? #ffffffPara sair com o veiculo remova a mangueira dele.", source, 255, 255, 255, true ) end -- Fim end -- Fim end -- Fim end -- Fim addEventHandler ( "onVehicleEnter", getRootElement(), Enter_Vehicle ) function Exit_Vehicle (source) local Veiculo = getPedOccupiedVehicle(source) -- Verifica o veiculo que o jogador está conduzindo if getElementData(Veiculo, "Aguardando_Gasolina") == true then -- O Veiculo precisa está aguardando a gasolina unbindKey (source, "k", "down", Perm_Abastercer ) -- Remove uso da função Abastecer veiculo unbindKey (source, "k", "down", Sair_Veh ) -- Remove uso da função sair com veiculo end -- Fim end -- Fim addEventHandler ( "onVehicleStartExit", getRootElement(), Exit_Vehicle ) --[[ ><><><><><><><><><><><><><><><><><>< >< Mangueira Veiculo >< ><><><><><><><><><><><><><><><><><>< --]] function Confirmar_Abastecimento (source) local vehicles = getElementsByType ( "vehicle" ) -- Verifica todos os veiculos do servidor for _, veiculos in ipairs( vehicles ) do -- Loop de todos os veiculos if getElementData(veiculos, "Aguardando_Gasolina") == true then -- Os veiculos precisa estar aguardando gasolina if isElementWithinMarker(source, BomberTable[veiculos]) then -- O Jogador precisa está na bomba de gasolina. if getElementData(source, "Mangueira_Mão") == false then -- O Jogador Precisa está sem mangueira if getElementData(BomberTable[veiculos], "Mangueira_Acionada") == false then -- A bomba deve esta desocupada bindKey (source, "k", "down", Abastecer_Veh ) -- Adiciona BindKey pra abastecer outputChatBox ( "#00ff00⇨? #ff0000Posto #00ff00⇨? #ffffffAperte #00ff00'K' #ffffffPara que Pegue a Mangueira", source, 255, 255, 255, true ) end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim --[[ ><><><><><><><><><><><><><><><><><><>< >< Começar Abastecimento >< ><><><><><><><><><><><><><><><><><><>< --]] function Abastecer_Veh (source) local vehicles = getElementsByType ( "vehicle" ) -- Verifica todos os veiculos do jogo for _, veiculos in ipairs( vehicles ) do -- Faz um loop com todos os veiculos do jogo if getElementData(veiculos, "Aguardando_Gasolina") == true then -- Os veiculos precisa está aguardando gasolina if isElementWithinMarker(source, BomberTable[veiculos]) then -- o Jogador precisa está dentro da bomba de gasolina if getElementData(source, "Mangueira_Mão") == false then -- Jogador não pode está com mangueira na mão if getElementData(BomberTable[veiculos], "Mangueira_Acionada") == false then -- A bomba deve estar desocupada local Mangueira1 = getElementData(BomberTable[veiculos], "Pos_Mangueira(1)") or 0 -- Pos Mangueira X local Mangueira2 = getElementData(BomberTable[veiculos], "Pos_Mangueira(2)") or 0 -- Pos Mangueira Y local Mangueira3 = getElementData(BomberTable[veiculos], "Pos_Mangueira(3)") or 0 -- Pos Mangueira Z local px, py, pz = getElementPosition(source) -- Verifica posição do jogador Mangueira[source] = createObject (14463, px, py, pz) -- Cria uma mangueira exports.bone_attach:attachElementToBone (Mangueira[source], source, 12, 0, 0, 0.06, -180, 0, 0) -- Gruda a mangueira na mão do jogador setElementData(source, "Mangueira_Mão", true) -- Aciona mangueira na mão dele. setElementData(source, "Pos_Mangueira(1)", Mangueira1) -- Posição X pra criar a line3d setElementData(source, "Pos_Mangueira(2)", Mangueira2) -- Posição Y pra criar a line3d setElementData(source, "Pos_Mangueira(3)", Mangueira3) -- Posição Z pra criar a line3d unbindKey (source, "k", "down", Abastecer_Veh ) -- Remove Bind De abastecer outputChatBox ( "#00ff00⇨? #ff0000Posto #00ff00⇨? #ffffffAdicione a Mangueira no Veiculo.", source, 255, 255, 255, true ) else -- Caso a bomba de gasolina estiver sendo usada, Então envia a seguinte mensagem outputChatBox ( "#00ff00⇨? #ff0000Posto #00ff00⇨? #ffffffA Bomba já está sendo usada no veiculo", source, 255, 255, 255, true ) end -- Fim else -- Caso o jogador já estiver com uma mangueira envia a seguinte mensagem outputChatBox ( "#00ff00⇨? #ff0000Posto #00ff00⇨? #ffffffVocê já tem mangueira em suas mãos", source, 255, 255, 255, true ) end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim --[[ ><><><><><><><><><><><><><><><><><><><><><><>< >< Acionar mangueira no Veiculo >< ><><><><><><><><><><><><><><><><><><><><><><>< --]] function Mensagem_Veh (source) local vehicles = getElementsByType ( "vehicle" ) -- Verifica todos os veiculos do jogo for _, veiculos in ipairs( vehicles ) do -- Faz um loop com todos os veiculos do jogo if getElementData(veiculos, "Aguardando_Gasolina") == true then -- o Veiculo precisa está aguardando pra abastecer if isElementWithinMarker(source, TampaCombustivel[veiculos]) then -- Jogador precisa está na tampa de combustivel if getElementData(veiculos, "Mangueira_Veiculo") == false then -- o Veiculo não pode está com mangueira if getElementData(source, "Mangueira_Mão") == true then -- Jogador precisa está com mangueira na mão bindKey (source, "k", "down", Mangueira_Veh ) -- Adiciona Bindkey pra por mangueira no veiculo. outputChatBox ( "#00ff00⇨? #ff0000Posto #00ff00⇨? #ffffffAperte #00ff00'K' #ffffffPara colocar a Mangueira no Veiculo", source, 255, 255, 255, true ) end -- Fim else -- Se caso o veiculo já estiver com mangueira então Aciona as linhas abaixo if getElementData(source, "Mangueira_Mão") == false then -- Jogador precisa está com mangueira na mão bindKey (source, "k", "down", Remover_Mangueira_Veh ) -- Aciona bindKey Da funçao pra remover mangueira outputChatBox ( "#00ff00⇨? #ff0000Posto #00ff00⇨? #ffffffAperte #00ff00'K' #ffffffPara remover a Mangueira do Veiculo", source, 255, 255, 255, true ) end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim function Mangueira_Veh (source) local Mangueira1 = getElementData(source, "Pos_Mangueira(1)") or 0 -- Pos Mangueira (Jogador) X local Mangueira2 = getElementData(source, "Pos_Mangueira(2)") or 0 -- Pos Mangueira (Jogador) Y local Mangueira3 = getElementData(source, "Pos_Mangueira(3)") or 0 -- Pos Mangueira (Jogador) Z local vehicles = getElementsByType ( "vehicle" ) -- Verifica todos os veiculos do jogo for _, veiculos in ipairs( vehicles ) do -- Faz um loop com todos os veiculos do jogo for i, Marker in ipairs (MarkersTable) do -- Verifica Todos os Markers Criados if getElementData(veiculos, "Aguardando_Gasolina") == true then -- Veiculo precisa está aguardando gasolina if getElementData(veiculos, "Mangueira_Veiculo") == false then -- Veiculo não pode está com Mangueira. if isElementWithinMarker(source, TampaCombustivel[veiculos]) then -- Jogador precisa está na tampa de combustivel do veiculo if isElementWithinMarker(veiculos, Marker) then -- Jogador precisa está na tampa de combustivel do veiculo if getElementData(source, "Mangueira_Mão") == true then -- Jogador precisa está com mangueira em mãos if Mangueira[source] and isElement( Mangueira[source] ) then destroyElement ( Mangueira[source] ) Mangueira[source] = nil end -- Destroi mangueira do jogador local px, py, pz = getElementPosition(veiculos) -- Verifica posição do veiculo local Combustivel = tonumber(getElementData(veiculos, "DNL:Combustivel")) or 0 -- Verifica a quantia de Combustivel do veiculo TableMangueira_Veh[veiculos] = createObject (14463, px, py, pz) -- Cria mangueira attachElements (TableMangueira_Veh[veiculos], veiculos, 1.2, -2, 0 +0.2) -- Gruda Mangueira Veh setElementData(TableMangueira_Veh[veiculos], "ID_Mangueira", i) -- seta um ID Nas mangueira local ID_Mangueira = tonumber(getElementData(TableMangueira_Veh[veiculos], "ID_Mangueira")) or 0 -- Verifica o ID Da mangueira do veiculo local mx, my, mz = getElementPosition(TableMangueira_Veh[veiculos]) -- Verifica posição DA Mangueira do veiculo setElementData(source, "Mangueira_Mão", false) -- Remove mangueira do jogador setElementData(TableMangueira_Veh[veiculos], "Mangueira:Gasolina", true) -- Aciona a mangueira do veiculo como ocupada setElementData(veiculos, "ID_Mangueira", ID_Mangueira) -- Adiciona o ID Da mangueira no ID Do veiculo setElementData(veiculos, "Pos_Mangueira(1)", mx) -- Pos Mangueira (Veiculo) X setElementData(veiculos, "Pos_Mangueira(2)", my) -- Pos Mangueira (Veiculo) Y setElementData(veiculos, "Pos_Mangueira(3)", mz) -- Pos Mangueira (Veiculo) Z setElementData(veiculos, "Pos_MangueiraPlayer(1)", Mangueira1) -- Pos Mangueira (Jogador) X setElementData(veiculos, "Pos_MangueiraPlayer(2)", Mangueira2) -- Pos Mangueira (Jogador) Y setElementData(veiculos, "Pos_MangueiraPlayer(3)", Mangueira3) -- Pos Mangueira (Jogador) Z setElementData(veiculos, "Mangueira_Veiculo", true) -- Aciona veiculo com a mangueira setElementData(BomberTable[veiculos], "Mangueira_Acionada", true) -- Aciona a bomba como ocupada outputChatBox ( "#00ff00⇨? #ff0000Posto #00ff00⇨? #ffffffSeu veiculo está na Bomba #00ff00"..ID_Mangueira.." #ffffffFique Ciente disso quando for abastecer.", source, 255, 255, 255, true ) unbindKey (source, "k", "down", Mangueira_Veh ) -- Remove bind if Combustivel >= 90 then -- Verifica se o combustivel do veiculo é Maior ou igual a 90. setElementData(TableMangueira_Veh[veiculos], "Combustivel_Cheio", true) -- Se for igual ou maior que 90 então Aciona o combustivel como cheio setElementData(veiculos, "Combustivel_Cheio", true) -- Se for igual ou maior que 90 então Aciona o combustivel como cheio outputChatBox ( "#00ff00⇨? #ff0000Posto #00ff00⇨? #ffffffEsse Veiculo não precisa ser abastecido, Por favor retire a mangueira.", source, 255, 255, 255, true ) else -- se for menor que 90 então... setElementData(TableMangueira_Veh[veiculos], "Combustivel_Cheio", false) -- Se for igual ou maior que 90 então Aciona o combustivel como cheio setElementData(veiculos, "Combustivel_Cheio", false) -- Então aciona o combustivel como vazio end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim --[[ ><><><><><><><><><><><><><><><><><><><><>< >< Remover mangueira veiculo >< ><><><><><><><><><><><><><><><><><><><><>< --]] function Remover_Mangueira_Veh (source) local vehicles = getElementsByType ( "vehicle" ) -- Verifica todos os veiculos do jogo for _, veiculos in ipairs( vehicles ) do -- Faz um loop com todos os veiculos do jogo if getElementData(veiculos, "Aguardando_Gasolina") == true then -- Veiculo deve esta aguardando pra abastecer if isElementWithinMarker(source, TampaCombustivel[veiculos]) then -- Verifica se o jogado está na tampa de combustivel if getElementData(veiculos, "Mangueira_Veiculo") == true then -- Mangueira deve está no veiculo if getElementData(source, "Mangueira_Mão") == false then -- Jogador não pode ta com mangueira em mãos if getElementData(veiculos, "Abastecendo") == false then -- O Veiculo não pode está sendo abastecido if TableMangueira_Veh[veiculos] and isElement( TableMangueira_Veh[veiculos] ) then destroyElement ( TableMangueira_Veh[veiculos] ) TableMangueira_Veh[veiculos] = nil end -- Destroi mangueira do veiculo setElementData(veiculos, "Pos_Mangueira(1)", 0) -- Seta posição da mangueira 0 setElementData(veiculos, "Pos_Mangueira(2)", 0) -- Seta posição da mangueira 0 setElementData(veiculos, "Pos_Mangueira(3)", 0) -- Seta posição da mangueira 0 setElementData(veiculos, "Pos_MangueiraPlayer(1)", 0) -- Seta posição da mangueira 0 setElementData(veiculos, "Pos_MangueiraPlayer(2)", 0) -- Seta posição da mangueira 0 setElementData(veiculos, "Pos_MangueiraPlayer(3)", 0) -- Seta posição da mangueira 0 setElementData(veiculos, "Mangueira_Veiculo", false) -- Aciona o veiculo como sem mangueira setElementData(BomberTable[veiculos], "Mangueira_Acionada", false) -- Aciona A Mangueira como vazia unbindKey (source, "k", "down", Remover_Mangueira_Veh ) -- Remove bindKey else -- se o veiculo estiver sendo abastecido envia a seguinte mensagem unbindKey (source, "k", "down", Remover_Mangueira_Veh ) -- Remove bindKey outputChatBox ( "#00ff00⇨? #ff0000ERRO #00ff00⇨? #ffffffO Veiculo está sendo abastecido, Aguarde terminar.", source, 255,255,255,true) end -- Fim else -- se o jogador estiver com mangueira envia a seguinte mensagem unbindKey (source, "k", "down", Remover_Mangueira_Veh ) -- Remove bindKey outputChatBox ( "#00ff00⇨? #ff0000ERRO #00ff00⇨? #ffffffVocê está com mangueira nas mãos!", source, 255,255,255,true) end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim --[[ ><><><><><><><><><><><><><><><><><><><><>< >< Veiculo sendo abastecido >< ><><><><><><><><><><><><><><><><><><><><>< --]] function Abastecendo_Veiculo (source, Nome_Veh, Id_Veh, getQuantia) for _, vehicle in ipairs( getElementsByType ( "vehicle" ) ) do -- Verifica todos os veiculos do servidor local VehicleID = tonumber(Id_Veh) -- Pega o ID do veiculo if(VehicleID) then -- Verifica se o id Do veiculo é valido local Vehicle2 = getVehicleByID(VehicleID) -- Verifica o id do veiculo if(Vehicle2) then -- Verificação for i, Marker in ipairs (MarkersTable) do -- Verifica todos os postos do servidor if getElementData(vehicle, "Aguardando_Gasolina") == true then -- Verifica se o carro está aguardando pra ser abastecido if isElementWithinMarker(vehicle, Marker) then -- Verifica se o Veiculo Está dentro do Marker local ID_Mangueira = tonumber(getElementData(vehicle, "ID_Mangueira")) or 0 -- Verifica ID Da mangueira do veiculo local Combustivel = tonumber(getElementData(vehicle, "DNL:Combustivel")) or 0 if tonumber(Id_Veh) == ID_Mangueira then -- Id do veiculo deve ter o mesmo Id da mangueira if getElementData(vehicle, "Mangueira_Veiculo") == true then -- Verifica se o veiculo está com mangueira if getElementData(source, "Mangueira_Mão") == false then -- O Jogador não pode esta com mangueira em suas mãos if getElementData(vehicle, "DNL:Combustivel") < 90 then -- Gasolina do veiculo deve ser menor que 90 if getElementData(vehicle, "Abastecendo") == false then -- Verifica se o veiculo já está sendo abastecido if getElementData(source, "Abastecendo") == false then -- Verifica se o veiculo já está sendo abastecido if getPlayerMoney ( source ) >= 500 then -- Verifica se o jogador tem dinheiro setElementData(vehicle, "Abastecendo", true) -- Adiciona o veiculo como abastecendo setElementData(source, "Abastecendo", true) -- Adiciona o jogador como abastecendo setElementData(vehicle, "DNL:Litros", getQuantia) -- Adiciona os litros que o jogador pois outputChatBox ( "#00ff00⇨? #ff0000ERRO #00ff00⇨? #ffffffVeiculo da Bomba #00ff00"..ID_Mangueira.." #ffffffestá sendo abastecido!", source, 255,255,255,true) Tempo[source] = setTimer ( function() -- Timer pra tudo abaixo acontecer setElementData(vehicle, "DNL:Combustivel", getElementData(vehicle, "DNL:Combustivel") +10) -- Adiciona 1 litro de gasolina a cada segundo setElementData(vehicle, "DNL:Litros", getElementData(vehicle, "DNL:Litros") -10) -- Remove um litro de gasolina que o jogador quis adicionar takePlayerMoney(source, 500) -- Remover $200 do jogador playSoundFrontEnd(source, 12 ) -- Som pra alertar o Jogador if getElementData(vehicle, "DNL:Combustivel") >= 100 then -- Verifica se o veiculo já tem 100 Litros if isTimer(Tempo[source]) then killTimer(Tempo[source]) end -- Para o tempo setElementData(vehicle, "DNL:Litros", 0) -- Seta os litros como 0 (Evitar Bugs) setElementData(vehicle, "DNL:Combustivel", 100) -- Seta gasolina como 100 (Evitar Bugs) setElementData(vehicle, "Abastecendo", false) -- Remove o modo abastecendo do veiculo setElementData(source, "Abastecendo", false) -- Remove o jogador do modo abastecendo setElementData(vehicle, "Combustivel_Cheio", true) -- Seta o veiculo como Tanque cheio setElementData(TableMangueira_Veh[vehicle], "Combustivel_Cheio", true) -- Seta o veiculo como Tanque cheio playSoundFrontEnd(source, 2 ) -- Som pra alertar o Jogador outputChatBox ( "#00ff00⇨? #ff0000ERRO #00ff00⇨? #ffffffO veiculo da bomba #00ff00"..ID_Mangueira.." #ffffffFoi abastecido completamente.", source, 255,255,255,true) elseif getPlayerMoney ( source ) < 5 then if isTimer(Tempo[source]) then killTimer(Tempo[source]) end -- Para o tempo setElementData(vehicle, "Abastecendo", false) -- Remove o modo abastecendo do veiculo setElementData(source, "Abastecendo", false) -- Remove o jogador do modo abastecendo setElementData(vehicle, "DNL:Litros", 0) -- Seta os litros como 0 (Evitar Bugs) playSoundFrontEnd(source, 8) -- Som pra alertar o Jogador outputChatBox ( "#00ff00⇨? #ff0000ERRO #00ff00⇨? #ffffffSeu dinheiro acabou e seu veiculo parou de ser abastecido.", source, 255,255,255,true) elseif getElementData(vehicle, "DNL:Litros") <= 0 then if isTimer(Tempo[source]) then killTimer(Tempo[source]) end -- Para o tempo setElementData(vehicle, "DNL:Litros", 0) -- Seta os litros como 0 (Evitar Bugs) setElementData(vehicle, "Abastecendo", false) -- Remove o modo abastecendo do veiculo setElementData(source, "Abastecendo", false) -- Remove o jogador do modo abastecendo playSoundFrontEnd(source, 10 ) -- Som pra alertar o Jogador outputChatBox ( "#00ff00⇨? #ff0000ERRO #00ff00⇨? #ffffffA Quantia de litro desejada já foi adicionada no veiculo.", source, 255,255,255,true) end -- Fim end, 1000, 0 ) -- Tempo Timer "1000" Modo timer "0" else outputChatBox ("#00ff00⇨? #ff0000Posto #00ff00⇨? #ffffffSeu dinheiro acabou e não foi possivel terminar de abastecer.", source, 255, 255, 255, true) end -- Fim else outputChatBox ("#00ff00⇨? #ff0000Posto #00ff00⇨? #ffffffVocê já está abastecendo um veiculo, Aguarde terminar", source, 255, 255, 255, true) end -- Fim else outputChatBox ("#00ff00⇨? #ff0000Posto #00ff00⇨? #ffffffEsse veiculo já está sendo abastecido", source, 255, 255, 255, true) end -- Fim else outputChatBox ("#00ff00⇨? #ff0000Posto #00ff00⇨? #ffffffEsse veiculo não precisa ser abastecido", source, 255, 255, 255, true) end -- Fim else outputChatBox ("#00ff00⇨? #ff0000Posto #00ff00⇨? #ffffffVocê está com mangueira em mãos, Remova.", source, 255, 255, 255, true) end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim end -- Fim addEvent("DNL:Abastecer_Veiculo", true) addEventHandler("DNL:Abastecer_Veiculo", root, Abastecendo_Veiculo) --[[ ><><><><><><><><><><><>< >< Ignora >< ><><><><><><><><><><><>< --]] function Contador_Combustivel () for _, players in ipairs( getElementsByType 'player' ) do -- Verifica Todos jogadores Online local Motorista = getPedOccupiedVehicleSeat ( players ) if Motorista == 0 then for _, veh in ipairs ( Veiculos ) do local Veiculo = getPedOccupiedVehicle ( players ) local ID_Veh = getElementModel ( Veiculo ) if ID_Veh == veh then local Combustivel = getElementData ( Veiculo, "DNL:Combustivel" ) or 30 if getVehicleEngineState ( Veiculo ) and Combustivel > 0 then VelocidadeX, VelocidadeY, VelocidadeZ = getElementVelocity ( Veiculo ) VelocidadeAtual = ( VelocidadeX ^ 2 + VelocidadeY ^ 2 + VelocidadeZ ^ 2 ) ^ ( 0.5 ) KMH = math.floor ( VelocidadeAtual * 180 ) if KMH == 0 then Combustivel_Seg = 0 elseif KMH > 0 then Combustivel_Seg = 0.1 end Combustivel = Combustivel - Combustivel_Seg end if Combustivel <= 0.50 then Combustivel = 0 setVehicleEngineState ( Veiculo, false ) end setElementData ( Veiculo, "DNL:Combustivel", Combustivel ) end end end end end setTimer ( Contador_Combustivel, 3000, 0 ) addEventHandler("onResourceStart", resourceRoot, function () for _, vehicle in ipairs( getElementsByType ( "vehicle" ) ) do for _, veh in ipairs ( Veiculos ) do local ID_Veh = getElementModel ( vehicle ) if ID_Veh == veh then local Combustivel = tonumber(getElementData(vehicle, "DNL:Combustivel")) or 0 setElementData(vehicle, "DNL:Combustivel", Combustivel) setElementData(vehicle, "Aguardando_Gasolina", false) setElementData(vehicle, "Mangueira_Veiculo", false) if Combustivel == 0 or Combustivel == false then setElementData(vehicle, "DNL:Combustivel", 50) end end end end end) function Refresh_Lista_Posto1 (source, text) if tostring(text) == "" or text == false or text == nil then for i, vehicle in ipairs(getElementsByType("vehicle")) do local Combustivel = tonumber(getElementData(vehicle, "DNL:Combustivel")) or 0 local ID_Mangueira_ = tonumber(getElementData(vehicle, "ID_Mangueira")) or 0 if getElementData(vehicle, "Mangueira_Veiculo") == true then if Combustivel < 90 then if getElementData(vehicle, "Abastecendo") == false then if ID_Mangueira_ == 1 or ID_Mangueira_ == 2 or ID_Mangueira_ == 3 or ID_Mangueira_ == 4 then local ID_Mangueira = tonumber(getElementData(TableMangueira_Veh[vehicle], "ID_Mangueira")) or 0 local vehicleName = getVehicleName (vehicle) triggerClientEvent(root, "DNL:Refresh_Lista_Posto1_C(Veiculos)", root, vehicleName, ID_Mangueira) end end end end end end end addEvent("DNL:Refresh_Lista_Posto1(Veiculos)",true) addEventHandler("DNL:Refresh_Lista_Posto1(Veiculos)", root, Refresh_Lista_Posto1) function Refresh_Lista_Posto2 (source, text) if tostring(text) == "" or text == false or text == nil then for i, vehicle in ipairs(getElementsByType("vehicle")) do local Combustivel = tonumber(getElementData(vehicle, "DNL:Combustivel")) or 0 local ID_Mangueira_ = tonumber(getElementData(vehicle, "ID_Mangueira")) or 0 if getElementData(vehicle, "Mangueira_Veiculo") == true then if Combustivel < 90 then if getElementData(vehicle, "Abastecendo") == false then if ID_Mangueira_ == 5 or ID_Mangueira_ == 6 or ID_Mangueira_ == 7 or ID_Mangueira_ == 8 then local ID_Mangueira = tonumber(getElementData(TableMangueira_Veh[vehicle], "ID_Mangueira")) or 0 local vehicleName = getVehicleName (vehicle) triggerClientEvent(root, "DNL:Refresh_Lista_Posto2_C(Veiculos)", root, vehicleName, ID_Mangueira) end end end end end end end addEvent("DNL:Refresh_Lista_Posto2(Veiculos)",true) addEventHandler("DNL:Refresh_Lista_Posto2(Veiculos)", root, Refresh_Lista_Posto2) function Refresh_Lista_Posto3 (source, text) if tostring(text) == "" or text == false or text == nil then for i, vehicle in ipairs(getElementsByType("vehicle")) do local Combustivel = tonumber(getElementData(vehicle, "DNL:Combustivel")) or 0 local ID_Mangueira_ = tonumber(getElementData(vehicle, "ID_Mangueira")) or 0 if getElementData(vehicle, "Mangueira_Veiculo") == true then if Combustivel < 90 then if getElementData(vehicle, "Abastecendo") == false then if ID_Mangueira_ == 9 or ID_Mangueira_ == 10 or ID_Mangueira_ == 11 or ID_Mangueira_ == 12 then local ID_Mangueira = tonumber(getElementData(TableMangueira_Veh[vehicle], "ID_Mangueira")) or 0 local vehicleName = getVehicleName (vehicle) triggerClientEvent(root, "DNL:Refresh_Lista_Posto3_C(Veiculos)", root, vehicleName, ID_Mangueira) end end end end end end end addEvent("DNL:Refresh_Lista_Posto3(Veiculos)",true) addEventHandler("DNL:Refresh_Lista_Posto3(Veiculos)", root, Refresh_Lista_Posto3) function Refresh_Lista_Posto4 (source, text) if tostring(text) == "" or text == false or text == nil then for i, vehicle in ipairs(getElementsByType("vehicle")) do local Combustivel = tonumber(getElementData(vehicle, "DNL:Combustivel")) or 0 local ID_Mangueira_ = tonumber(getElementData(vehicle, "ID_Mangueira")) or 0 if getElementData(vehicle, "Mangueira_Veiculo") == true then if Combustivel < 90 then if getElementData(vehicle, "Abastecendo") == false then if ID_Mangueira_ == 13 or ID_Mangueira_ == 14 or ID_Mangueira_ == 15 or ID_Mangueira_ == 16 then local ID_Mangueira = tonumber(getElementData(TableMangueira_Veh[vehicle], "ID_Mangueira")) or 0 local vehicleName = getVehicleName (vehicle) triggerClientEvent(root, "DNL:Refresh_Lista_Posto4_C(Veiculos)", root, vehicleName, ID_Mangueira) end end end end end end end addEvent("DNL:Refresh_Lista_Posto4(Veiculos)",true) addEventHandler("DNL:Refresh_Lista_Posto4(Veiculos)", root, Refresh_Lista_Posto4) function Refresh_Lista_Posto5 (source, text) if tostring(text) == "" or text == false or text == nil then for i, vehicle in ipairs(getElementsByType("vehicle")) do local Combustivel = tonumber(getElementData(vehicle, "DNL:Combustivel")) or 0 local ID_Mangueira_ = tonumber(getElementData(vehicle, "ID_Mangueira")) or 0 if getElementData(vehicle, "Mangueira_Veiculo") == true then if Combustivel < 90 then if getElementData(vehicle, "Abastecendo") == false then if ID_Mangueira_ == 17 or ID_Mangueira_ == 18 or ID_Mangueira_ == 19 or ID_Mangueira_ == 20 then local ID_Mangueira = tonumber(getElementData(TableMangueira_Veh[vehicle], "ID_Mangueira")) or 0 local vehicleName = getVehicleName (vehicle) triggerClientEvent(root, "DNL:Refresh_Lista_Posto5_C(Veiculos)", root, vehicleName, ID_Mangueira) end end end end end end end addEvent("DNL:Refresh_Lista_Posto5(Veiculos)",true) addEventHandler("DNL:Refresh_Lista_Posto5(Veiculos)", root, Refresh_Lista_Posto5) function Refresh_Lista_Posto6 (source, text) if tostring(text) == "" or text == false or text == nil then for i, vehicle in ipairs(getElementsByType("vehicle")) do local Combustivel = tonumber(getElementData(vehicle, "DNL:Combustivel")) or 0 local ID_Mangueira_ = tonumber(getElementData(vehicle, "ID_Mangueira")) or 0 if getElementData(vehicle, "Mangueira_Veiculo") == true then if Combustivel < 90 then if getElementData(vehicle, "Abastecendo") == false then if ID_Mangueira_ == 21 or ID_Mangueira_ == 22 or ID_Mangueira_ == 23 or ID_Mangueira_ == 24 then local ID_Mangueira = tonumber(getElementData(TableMangueira_Veh[vehicle], "ID_Mangueira")) or 0 local vehicleName = getVehicleName (vehicle) triggerClientEvent(root, "DNL:Refresh_Lista_Posto6_C(Veiculos)", root, vehicleName, ID_Mangueira) end end end end end end end addEvent("DNL:Refresh_Lista_Posto6(Veiculos)",true) addEventHandler("DNL:Refresh_Lista_Posto6(Veiculos)", root, Refresh_Lista_Posto6) function Refresh_Lista_Posto7 (source, text) if tostring(text) == "" or text == false or text == nil then for i, vehicle in ipairs(getElementsByType("vehicle")) do local Combustivel = tonumber(getElementData(vehicle, "DNL:Combustivel")) or 0 local ID_Mangueira_ = tonumber(getElementData(vehicle, "ID_Mangueira")) or 0 if getElementData(vehicle, "Mangueira_Veiculo") == true then if Combustivel < 90 then if getElementData(vehicle, "Abastecendo") == false then if ID_Mangueira_ == 25 or ID_Mangueira_ == 26 or ID_Mangueira_ == 27 or ID_Mangueira_ == 28 then local ID_Mangueira = tonumber(getElementData(TableMangueira_Veh[vehicle], "ID_Mangueira")) or 0 local vehicleName = getVehicleName (vehicle) triggerClientEvent(root, "DNL:Refresh_Lista_Posto7_C(Veiculos)", root, vehicleName, ID_Mangueira) end end end end end end end addEvent("DNL:Refresh_Lista_Posto7(Veiculos)",true) addEventHandler("DNL:Refresh_Lista_Posto7(Veiculos)", root, Refresh_Lista_Posto7) function Refresh_Lista_Posto8 (source, text) if tostring(text) == "" or text == false or text == nil then for i, vehicle in ipairs(getElementsByType("vehicle")) do local Combustivel = tonumber(getElementData(vehicle, "DNL:Combustivel")) or 0 local ID_Mangueira_ = tonumber(getElementData(vehicle, "ID_Mangueira")) or 0 if getElementData(vehicle, "Mangueira_Veiculo") == true then if Combustivel < 90 then if getElementData(vehicle, "Abastecendo") == false then if ID_Mangueira_ == 29 or ID_Mangueira_ == 30 or ID_Mangueira_ == 31 or ID_Mangueira_ == 32 then local ID_Mangueira = tonumber(getElementData(TableMangueira_Veh[vehicle], "ID_Mangueira")) or 0 local vehicleName = getVehicleName (vehicle) triggerClientEvent(root, "DNL:Refresh_Lista_Posto8_C(Veiculos)", root, vehicleName, ID_Mangueira) end end end end end end end addEvent("DNL:Refresh_Lista_Posto8(Veiculos)",true) addEventHandler("DNL:Refresh_Lista_Posto8(Veiculos)", root, Refresh_Lista_Posto8) function Quit_Server ( quitType ) if getElementData(source, "Mangueira_Mão") == true then if Mangueira[source] and isElement( Mangueira[source] ) then destroyElement ( Mangueira[source] ) Mangueira[source] = nil end end end addEventHandler ( "onPlayerQuit", root, Quit_Server ) --[[ /\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\/ Curta a Minha Página <3 https://www.facebook.com/danilinmtascr/ ::::::::: ::: :::: ::: ::::::::::: ::: ::::::::::: :::: ::: :+: :+: :+: :+: :+:+: :+: :+: :+: :+: :+:+: :+: +:+ +:+ +:+ +:+ :+:+:+ +:+ +:+ +:+ +:+ :+:+:+ +:+ +#+ +:+ +#++:++#++: +#+ +:+ +#+ +#+ +#+ +#+ +#+ +:+ +#+ +#+ +#+ +#+ +#+ +#+ +#+#+# +#+ +#+ +#+ +#+ +#+#+# #+# #+# #+# #+# #+# #+#+# #+# #+# #+# #+# #+#+# ######### ### ### ### #### ########### ########## ########### ### #### /\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\/ --]] --[[ ><><><><><><><><><><><><><><><><><><><>< >< Posto 1 >< ><><><><><><><><><><><><><><><><><><><>< --]] Entrar_Posto_1 = createMarker(1928.98999, -1776.31519, 13.54688 -1, "cylinder", 1.2, 255, 0, 0, 90) Blip_Posto_1 = createBlipAttachedTo ( Entrar_Posto_1, 44 ) setBlipVisibleDistance(Blip_Posto_1, 150) Sair_Posto_1 = createMarker(-27.37359, -57.86778, 1003.54688 -1, "cylinder", 1.2, 255, 0, 0, 90) setElementInterior(Sair_Posto_1, 6) setElementDimension(Sair_Posto_1, 90) Abrir_Posto_1 = createMarker(-23.39301, -55.33689, 1003.54688 -1, "cylinder", 1.2, 255, 0, 0, 90) setElementInterior(Abrir_Posto_1, 6) setElementDimension(Abrir_Posto_1, 90) function Entrar_Posto_1_ (source) setElementInterior(source, 6) setElementDimension(source, 90) setElementPosition(source, -27.62815, -56.12777, 1003.54688) end addEventHandler("onMarkerHit", Entrar_Posto_1, Entrar_Posto_1_) function Sair_Posto_1_ (source) if getElementDimension(source) == 90 and getElementInterior(source) == 6 then setElementInterior(source, 0) setElementDimension(source, 0) setElementPosition(source, 1932.10229, -1776.33704, 13.38281) end end addEventHandler("onMarkerHit", Sair_Posto_1, Sair_Posto_1_) function Abrir_Posto_1_(source) local account = getPlayerAccount (source) if isGuestAccount (account) then outputChatBox ( "#ff0000⇨? #ff0000Posto Gasolina #ff0000⇨? #FFFFFFVocê não pode Pagar Multas Deslogado!", source, 255,255,255,true) return end if isElementWithinMarker(source, Abrir_Posto_1) then if getElementDimension(source) == 90 and getElementInterior(source) == 6 then triggerClientEvent(source,"DNL:Abrir_Posto_1",source) end end end addEventHandler( "onMarkerHit", Abrir_Posto_1, Abrir_Posto_1_ ) --[[ ><><><><><><><><><><><><><><><><><><><>< >< Posto 2 >< ><><><><><><><><><><><><><><><><><><><>< --]] Entrar_Posto_2 = createMarker(1000.32123, -919.95605, 42.32813 -1, "cylinder", 1.2, 255, 0, 0, 90) Blip_Posto_2 = createBlipAttachedTo ( Entrar_Posto_2, 44 ) setBlipVisibleDistance(Blip_Posto_2, 150) Sair_Posto_2 = createMarker(-27.37359, -57.86778, 1003.54688 -1, "cylinder", 1.2, 255, 0, 0, 90) setElementInterior(Sair_Posto_2, 6) setElementDimension(Sair_Posto_2, 91) Abrir_Posto_2 = createMarker(-23.39301, -55.33689, 1003.54688 -1, "cylinder", 1.2, 255, 0, 0, 90) setElementInterior(Abrir_Posto_2, 6) setElementDimension(Abrir_Posto_2, 91) function Entrar_Posto_2_ (source) setElementInterior(source, 6) setElementDimension(source, 91) setElementPosition(source, -27.62815, -56.12777, 1003.54688) end addEventHandler("onMarkerHit", Entrar_Posto_2, Entrar_Posto_2_) function Sair_Posto_2_ (source) if getElementDimension(source) == 91 and getElementInterior(source) == 6 then setElementInterior(source, 0) setElementDimension(source, 0) setElementPosition(source, 998.09253, -920.19574, 42.17969) end end addEventHandler("onMarkerHit", Sair_Posto_2, Sair_Posto_2_) function Abrir_Posto_1_(source) local account = getPlayerAccount (source) if isGuestAccount (account) then outputChatBox ( "#ff0000⇨? #ff0000Posto Gasolina #ff0000⇨? #FFFFFFVocê não pode Pagar Multas Deslogado!", source, 255,255,255,true) return end if isElementWithinMarker(source, Abrir_Posto_1) then if getElementDimension(source) == 91 and getElementInterior(source) == 6 then triggerClientEvent(source,"DNL:Abrir_Posto_2",source) end end end addEventHandler( "onMarkerHit", Abrir_Posto_1, Abrir_Posto_1_ ) --[[ ><><><><><><><><><><><><><><><><><><><>< >< Posto 3 >< ><><><><><><><><><><><><><><><><><><><>< --]] Entrar_Posto_3 = createMarker(2117.453, 897.261, 11.18 -1, "cylinder", 1.2, 255, 0, 0, 90) Blip_Posto_3 = createBlipAttachedTo ( Entrar_Posto_3, 44 ) setBlipVisibleDistance(Blip_Posto_3, 150) Sair_Posto_3 = createMarker(-27.37359, -57.86778, 1003.54688 -1, "cylinder", 1.2, 255, 0, 0, 90) setElementInterior(Sair_Posto_3, 6) setElementDimension(Sair_Posto_3, 111) Abrir_Posto_3 = createMarker(-23.39301, -55.33689, 1003.54688 -1, "cylinder", 1.2, 255, 0, 0, 90) setElementInterior(Abrir_Posto_3, 6) setElementDimension(Abrir_Posto_3, 111) function Entrar_Posto_3_ (source) setElementInterior(source, 6) setElementDimension(source, 111) setElementPosition(source, -27.62815, -56.12777, 1003.54688) end addEventHandler("onMarkerHit", Entrar_Posto_3, Entrar_Posto_3_) function Sair_Posto_3_ (source) if getElementDimension(source) == 111 and getElementInterior(source) == 6 then setElementInterior(source, 0) setElementDimension(source, 0) setElementPosition(source, 2116.79, 901.721, 10.82) end end addEventHandler("onMarkerHit", Sair_Posto_3, Sair_Posto_3_) function Abrir_Posto_1_(source) local account = getPlayerAccount (source) if isGuestAccount (account) then outputChatBox ( "#ff0000⇨? #ff0000Posto Gasolina #ff0000⇨? #FFFFFFVocê não pode Pagar Multas Deslogado!", source, 255,255,255,true) return end if isElementWithinMarker(source, Abrir_Posto_1) then if getElementDimension(source) == 111 and getElementInterior(source) == 6 then triggerClientEvent(source,"DNL:Abrir_Posto_3",source) end end end addEventHandler( "onMarkerHit", Abrir_Posto_1, Abrir_Posto_1_ ) --[[ ><><><><><><><><><><><><><><><><><><><>< >< Posto 4 >< ><><><><><><><><><><><><><><><><><><><>< --]] Entrar_Posto_4 = createMarker(2188.57, 2469.644, 11.242 -1, "cylinder", 1.2, 255, 0, 0, 90) Blip_Posto_4 = createBlipAttachedTo ( Entrar_Posto_4, 44 ) setBlipVisibleDistance(Blip_Posto_4, 150) Sair_Posto_4 = createMarker(-27.37359, -57.86778, 1003.54688 -1, "cylinder", 1.2, 255, 0, 0, 90) setElementInterior(Sair_Posto_4, 6) setElementDimension(Sair_Posto_4, 112) Abrir_Posto_4 = createMarker(-23.39301, -55.33689, 1003.54688 -1, "cylinder", 1.2, 255, 0, 0, 90) setElementInterior(Abrir_Posto_4, 6) setElementDimension(Abrir_Posto_4, 112) function Entrar_Posto_4_ (source) setElementInterior(source, 6) setElementDimension(source, 112) setElementPosition(source, -27.62815, -56.12777, 1003.54688) end addEventHandler("onMarkerHit", Entrar_Posto_4, Entrar_Posto_4_) function Sair_Posto_4_ (source) if getElementDimension(source) == 112 and getElementInterior(source) == 6 then setElementInterior(source, 0) setElementDimension(source, 0) setElementPosition(source, 2191.634, 2469.36, 10.82) end end addEventHandler("onMarkerHit", Sair_Posto_4, Sair_Posto_4_) function Abrir_Posto_1_(source) local account = getPlayerAccount (source) if isGuestAccount (account) then outputChatBox ( "#ff0000⇨? #ff0000Posto Gasolina #ff0000⇨? #FFFFFFVocê não pode Pagar Multas Deslogado!", source, 255,255,255,true) return end if isElementWithinMarker(source, Abrir_Posto_1) then if getElementDimension(source) == 112 and getElementInterior(source) == 6 then triggerClientEvent(source,"DNL:Abrir_Posto_4",source) end end end addEventHandler( "onMarkerHit", Abrir_Posto_1, Abrir_Posto_1_ ) --[[ ><><><><><><><><><><><><><><><><><><><>< >< Posto 5 >< ><><><><><><><><><><><><><><><><><><><>< --]] Entrar_Posto_5 = createMarker(-2034.544, 148.567, 28.836 -1, "cylinder", 1.2, 255, 0, 0, 90) Blip_Posto_5 = createBlipAttachedTo ( Entrar_Posto_5, 44 ) setBlipVisibleDistance(Blip_Posto_5, 150) Sair_Posto_5 = createMarker(-27.37359, -57.86778, 1003.54688 -1, "cylinder", 1.2, 255, 0, 0, 90) setElementInterior(Sair_Posto_5, 6) setElementDimension(Sair_Posto_5, 113) Abrir_Posto_5 = createMarker(-23.39301, -55.33689, 1003.54688 -1, "cylinder", 1.2, 255, 0, 0, 90) setElementInterior(Abrir_Posto_5, 6) setElementDimension(Abrir_Posto_5, 113) function Entrar_Posto_5_ (source) setElementInterior(source, 6) setElementDimension(source, 113) setElementPosition(source, -27.62815, -56.12777, 1003.54688) end addEventHandler("onMarkerHit", Entrar_Posto_5, Entrar_Posto_5_) function Sair_Posto_5_ (source) if getElementDimension(source) == 113 and getElementInterior(source) == 6 then setElementInterior(source, 0) setElementDimension(source, 0) setElementPosition(source, -2030.538, 148.699, 28.836) end end addEventHandler("onMarkerHit", Sair_Posto_5, Sair_Posto_5_) function Abrir_Posto_1_(source) local account = getPlayerAccount (source) if isGuestAccount (account) then outputChatBox ( "#ff0000⇨? #ff0000Posto Gasolina #ff0000⇨? #FFFFFFVocê não pode Pagar Multas Deslogado!", source, 255,255,255,true) return end if isElementWithinMarker(source, Abrir_Posto_1) then if getElementDimension(source) == 113 and getElementInterior(source) == 6 then triggerClientEvent(source,"DNL:Abrir_Posto_5",source) end end end addEventHandler( "onMarkerHit", Abrir_Posto_1, Abrir_Posto_1_ ) --[[ ><><><><><><><><><><><><><><><><><><><>< >< Posto 6 >< ><><><><><><><><><><><><><><><><><><><>< --]] Entrar_Posto_6 = createMarker(-2420.074, 969.994, 45.297 -1, "cylinder", 1.2, 255, 0, 0, 90) Blip_Posto_6 = createBlipAttachedTo ( Entrar_Posto_6, 44 ) setBlipVisibleDistance(Blip_Posto_6, 150) Sair_Posto_6 = createMarker(-27.37359, -57.86778, 1003.54688 -1, "cylinder", 1.2, 255, 0, 0, 90) setElementInterior(Sair_Posto_6, 6) setElementDimension(Sair_Posto_6, 114) Abrir_Posto_6 = createMarker(-23.39301, -55.33689, 1003.54688 -1, "cylinder", 1.2, 255, 0, 0, 90) setElementInterior(Abrir_Posto_6, 6) setElementDimension(Abrir_Posto_6, 114) function Entrar_Posto_6_ (source) setElementInterior(source, 6) setElementDimension(source, 114) setElementPosition(source, -27.62815, -56.12777, 1003.54688) end addEventHandler("onMarkerHit", Entrar_Posto_6, Entrar_Posto_6_) function Sair_Posto_6_ (source) if getElementDimension(source) == 114 and getElementInterior(source) == 6 then setElementInterior(source, 0) setElementDimension(source, 0) setElementPosition(source, -2417.815, 973.539, 45.297) end end addEventHandler("onMarkerHit", Sair_Posto_6, Sair_Posto_6_) function Abrir_Posto_1_(source) local account = getPlayerAccount (source) if isGuestAccount (account) then outputChatBox ( "#ff0000⇨? #ff0000Posto Gasolina #ff0000⇨? #FFFFFFVocê não pode Pagar Multas Deslogado!", source, 255,255,255,true) return end if isElementWithinMarker(source, Abrir_Posto_1) then if getElementDimension(source) == 114 and getElementInterior(source) == 6 then triggerClientEvent(source,"DNL:Abrir_Posto_6",source) end end end addEventHandler( "onMarkerHit", Abrir_Posto_1, Abrir_Posto_1_ ) --[[ ><><><><><><><><><><><><><><><><><><><>< >< Posto 7 >< ><><><><><><><><><><><><><><><><><><><>< --]] Entrar_Posto_7 = createMarker(-1567.262, -2730.043, 48.743 -1, "cylinder", 1.2, 255, 0, 0, 90) Blip_Posto_7 = createBlipAttachedTo ( Entrar_Posto_7, 44 ) setBlipVisibleDistance(Blip_Posto_7, 150) Sair_Posto_7 = createMarker(-27.37359, -57.86778, 1003.54688 -1, "cylinder", 1.2, 255, 0, 0, 90) setElementInterior(Sair_Posto_7, 6) setElementDimension(Sair_Posto_7, 115) Abrir_Posto_7 = createMarker(-23.39301, -55.33689, 1003.54688 -1, "cylinder", 1.2, 255, 0, 0, 90) setElementInterior(Abrir_Posto_7, 6) setElementDimension(Abrir_Posto_7, 115) function Entrar_Posto_7_ (source) setElementInterior(source, 6) setElementDimension(source, 115) setElementPosition(source, -27.62815, -56.12777, 1003.54688) end addEventHandler("onMarkerHit", Entrar_Posto_7, Entrar_Posto_7_) function Sair_Posto_7_ (source) if getElementDimension(source) == 115 and getElementInterior(source) == 6 then setElementInterior(source, 0) setElementDimension(source, 0) setElementPosition(source, -1574.782, -2725.423, 48.743) end end addEventHandler("onMarkerHit", Sair_Posto_7, Sair_Posto_7_) function Abrir_Posto_1_(source) local account = getPlayerAccount (source) if isGuestAccount (account) then outputChatBox ( "#ff0000⇨? #ff0000Posto Gasolina #ff0000⇨? #FFFFFFVocê não pode Pagar Multas Deslogado!", source, 255,255,255,true) return end if isElementWithinMarker(source, Abrir_Posto_1) then if getElementDimension(source) == 115 and getElementInterior(source) == 6 then triggerClientEvent(source,"DNL:Abrir_Posto_7",source) end end end addEventHandler( "onMarkerHit", Abrir_Posto_1, Abrir_Posto_1_ ) --[[ ><><><><><><><><><><><><><><><><><><><>< >< Posto 8 >< ><><><><><><><><><><><><><><><><><><><>< --]] Entrar_Posto_8 = createMarker(-1320.293, 2698.297, 50.266 -1, "cylinder", 1.2, 255, 0, 0, 90) Blip_Posto_8 = createBlipAttachedTo ( Entrar_Posto_8, 44 ) setBlipVisibleDistance(Blip_Posto_8, 150) Sair_Posto_8 = createMarker(-27.37359, -57.86778, 1003.54688 -1, "cylinder", 1.2, 255, 0, 0, 90) setElementInterior(Sair_Posto_8, 6) setElementDimension(Sair_Posto_8, 116) Abrir_Posto_8 = createMarker(-23.39301, -55.33689, 1003.54688 -1, "cylinder", 1.2, 255, 0, 0, 90) setElementInterior(Abrir_Posto_8, 6) setElementDimension(Abrir_Posto_8, 116) function Entrar_Posto_8_ (source) setElementInterior(source, 6) setElementDimension(source, 116) setElementPosition(source, -27.62815, -56.12777, 1003.54688) end addEventHandler("onMarkerHit", Entrar_Posto_8, Entrar_Posto_8_) function Sair_Posto_8_ (source) if getElementDimension(source) == 116 and getElementInterior(source) == 6 then setElementInterior(source, 0) setElementDimension(source, 0) setElementPosition(source, -1319.808, 2693.725, 50.063) end end addEventHandler("onMarkerHit", Sair_Posto_8, Sair_Posto_8_) function Abrir_Posto_1_(source) local account = getPlayerAccount (source) if isGuestAccount (account) then outputChatBox ( "#ff0000⇨? #ff0000Posto Gasolina #ff0000⇨? #FFFFFFVocê não pode Pagar Multas Deslogado!", source, 255,255,255,true) return end if isElementWithinMarker(source, Abrir_Posto_1) then if getElementDimension(source) == 116 and getElementInterior(source) == 6 then triggerClientEvent(source,"DNL:Abrir_Posto_8",source) end end end addEventHandler( "onMarkerHit", Abrir_Posto_1, Abrir_Posto_1_ )
  7. Estou esperando vê se a msg aparece novamente para teste amigo!
  8. [2019-04-18 23:42:38] WARNING: [Script]SistemaMotor\[KND]_s.lua:21: Bad argument @ 'getVehicleEngineState' [Expected vehicle at argument 1, got boolean] --[[ --]] function OFF (theVehicle, leftSeat, jackerPlayer) if leftSeat == 0 and not jackerPlayer then local theVehicle = getPedOccupiedVehicle(source) if ( getVehicleEngineState ( theVehicle ) == true ) then setVehicleEngineState ( theVehicle, false ) triggerClientEvent (source, "motor-OFF", source) end end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), OFF ) --==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==- function ON () local theVehicle = getPedOccupiedVehicle(source) if ( getVehicleEngineState ( theVehicle ) == false ) then setVehicleEngineState ( theVehicle, true ) triggerClientEvent (source, "motor-ON", source) end end addEvent("motor-ON1", true) addEventHandler("motor-ON1", root, ON) --==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==- function Systemcar () triggerClientEvent (source, "systemcar", source) end addEventHandler ( "onPlayerVehicleExit", getRootElement(), Systemcar ) --==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==- function Desligar ( theVehicle, leftSeat, jackerPlayer ) if leftSeat == 0 and not jackerPlayer then setVehicleEngineState ( theVehicle, false ) end end addEventHandler ( "onPlayerVehicleExit", getRootElement ( ), Desligar )
  9. @Lord Henry Sua resposta não respondeu minha pergunta amigo, Sobre a fila eu sei hoje só tem 5 pessoas na minha frente falta pouco para pode realiza minha compra e mesmo assim obrigado ja conseguir resposta do que queria com outras pessoas fui pergunta para sabe mas sobre ela!
  10. Olá boa tarde, como sou brasileiro e nunca comprei a Top Lista para meu servidor queria tira uma duvida para quem sabe e ja comprou estou ciente que irei receber um email quando minha vez na posição chega estou em 10 lugar e quero que tudo de certo então gostaria de saber qual as forma de pagamento e quanto sai no valor brasileiro em reais?
  11. @DNL291 Não era isso! Alguém deleta meu tópico fazendo favor ! Ja resolve isso faz tempo! Mas Obrigado mesmo assim!
  12. [BR] • VIDA DE JOVEM • ~ ROLEPLAY ~ [ CORPS, VOICE, GANGS, VIPS ] VENHA CONHECER NOSSO SERVIDOR ~ R O L E P L A Y ~ SERVIDOR NOVO BEM CONFIGURADO COMPACTADO LEVE COM UM BOM PING Obs: Depende da Sua NET! Staff Sempre Online Vagas Abertas Para todos tipo de trabalhos CORPS, GANGS, SAMU, MECANICOS e Muitos Outros Trabalhos Vale a pena Visita passe seus 10Minutos Aqui e venha conhecer a verdadeira diversão de um R O L E P L A Y ID: mtasa://54.39.244.81:22853 DISCORD: discord.gg/jEyd4J3 PAGINA: https://www.facebook.com/VidaDeJovemBR/ WhatsApp: 71 987647252
  13. Eae galera alguém para me salva? Esta complicado aqui!
  14. Amigo o erro parou só esta dando mensagem de WARNING na mesma linha e não esta reparando o carro quando uso /reparar matheus da a mensagem de WARNING @DNL291 Este é o código correto que veio junto com os código, Porem da erro! Erro:
  15. Estou usando apenas ele tentei muda aqui mas não da da outro erro, estou aqui tentando dês de 7hrs da manhã ate agora só nisso ai mano ta complicado! Preciso muito disso Erro: Linha do Erro: Codigo:
  16. Obrigado amigo irei aguarda sua resposta irei fazer aqui, bom ne so a parte de localizar não é também a parte de reparar a localizar ja tenho no celular nem precisa o problema mesmo é reparar Desculpa comenta aqui novamente em baixo de outro tópico mas queria informa que achei uma coisa porem não estou conseguindo arruma creio que seja o problema de todo esse acontecimento ./debugscript 3 comando /reparar erro: linha: 250 @Lord Henry Linha do Erro: Codigo:
×
×
  • Create New...