Jump to content

viniciuss

Members
  • Posts

    5
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

viniciuss's Achievements

Vic

Vic (3/54)

1

Reputation

  1. tenho um sistema de gasolina e um mod de concessionária no meu servidor, está funcionando perfeitamente mas sempre que eu guardo o carro na garagem e depois tiro ele volta com 100% de gasolina ao invés de voltar como estava. NAO SEI COMO ARRUMAR ISSO. CLIENT.LUA local screenW, screenH = guiGetScreenSize() local x, y = (screenW/1366), (screenH/768) local dxfont0_icons = dxCreateFont("font/icons.ttf", x*12) local dxfont1_icons = dxCreateFont("font/icons.ttf", x*10) local dxfont0_OpenSans_Bold = dxCreateFont("font/OpenSans-Bold.ttf", x*12) local dxfont1_OpenSans_Bold = dxCreateFont("font/OpenSans-Bold.ttf", y*11) local RGEnviar = createElement("TS:EditBox_LojaCarrosBMV") painel = false painel2 = false Veiculo = {} --[[ ><><><><><><><><><><><><><><><><><><><>< ><Painel Inicial>< ><><><><><><><><><><><><><><><><><><><>< --]] function cancelDamage() if getElementData (source, "Imortal") == true then -- Se o NPC que foi atacado tiver a data "imortal", então cancela o dano nele. cancelEvent() end end addEventHandler ("onClientPedDamage", root, cancelDamage) function PainelLojaCarros () -- exports["Blur"]:dxDrawBluredRectangle(screenW * 0.7725, screenH * 0.1978, screenW * 0.2181, screenH * 0.7189, tocolor(255, 255, 255, 230)) dxDrawRectangle(screenW * 0.7725, screenH * 0.1978, screenW * 0.2181, screenH * 0.7189, tocolor(0, 0, 0, 148), false) dxDrawRectangle(screenW * 0.7725, screenH * 0.1978, screenW * 0.2181, screenH * 0.0578, tocolor(0, 0, 0, 189), false) dxDrawLine(screenW * 0.7725, screenH * 0.2556, screenW * 0.9906, screenH * 0.2556, tocolor(255,0,0, 255), 3, false) dxDrawText("Loja de Veiculos", screenW * 0.7725, screenH * 0.1978, screenW * 0.9906, screenH * 0.2556, tocolor(255, 255, 255, 255), 1.00, dxfont0_icons, "center", "center", false, false, false, false, false) dxDrawLine((screenW * 0.7875) - 1, (screenH * 0.6000) - 1, (screenW * 0.7875) - 1, screenH * 0.6456, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(screenW * 0.8169, (screenH * 0.6000) - 1, (screenW * 0.7875) - 1, (screenH * 0.6000) - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine((screenW * 0.7875) - 1, screenH * 0.6456, screenW * 0.8169, screenH * 0.6456, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(screenW * 0.8169, screenH * 0.6456, screenW * 0.8169, (screenH * 0.6000) - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(screenW * 0.7875, screenH * 0.6000, screenW * 0.0294, screenH * 0.0456, tocolor(255, 255, 255, 255), false) dxDrawLine((screenW * 0.8256) - 1, (screenH * 0.6000) - 1, (screenW * 0.8256) - 1, screenH * 0.6456, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(screenW * 0.8550, (screenH * 0.6000) - 1, (screenW * 0.8256) - 1, (screenH * 0.6000) - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine((screenW * 0.8256) - 1, screenH * 0.6456, screenW * 0.8550, screenH * 0.6456, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(screenW * 0.8550, screenH * 0.6456, screenW * 0.8550, (screenH * 0.6000) - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(screenW * 0.8256, screenH * 0.6000, screenW * 0.0294, screenH * 0.0456, tocolor(0, 0, 0, 255), false) dxDrawLine((screenW * 0.8638) - 1, (screenH * 0.6000) - 1, (screenW * 0.8638) - 1, screenH * 0.6456, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(screenW * 0.8931, (screenH * 0.6000) - 1, (screenW * 0.8638) - 1, (screenH * 0.6000) - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine((screenW * 0.8638) - 1, screenH * 0.6456, screenW * 0.8931, screenH * 0.6456, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(screenW * 0.8931, screenH * 0.6456, screenW * 0.8931, (screenH * 0.6000) - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(screenW * 0.8638, screenH * 0.6000, screenW * 0.0294, screenH * 0.0456, tocolor(0, 28, 241, 255), false) dxDrawLine((screenW * 0.9019) - 1, (screenH * 0.6000) - 1, (screenW * 0.9019) - 1, screenH * 0.6456, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(screenW * 0.9313, (screenH * 0.6000) - 1, (screenW * 0.9019) - 1, (screenH * 0.6000) - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine((screenW * 0.9019) - 1, screenH * 0.6456, screenW * 0.9313, screenH * 0.6456, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(screenW * 0.9313, screenH * 0.6456, screenW * 0.9313, (screenH * 0.6000) - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(screenW * 0.9019, screenH * 0.6000, screenW * 0.0294, screenH * 0.0456, tocolor(34, 240, 0, 255), false) dxDrawLine((screenW * 0.9400) - 1, (screenH * 0.6000) - 1, (screenW * 0.9400) - 1, screenH * 0.6456, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(screenW * 0.9694, (screenH * 0.6000) - 1, (screenW * 0.9400) - 1, (screenH * 0.6000) - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine((screenW * 0.9400) - 1, screenH * 0.6456, screenW * 0.9694, screenH * 0.6456, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(screenW * 0.9694, screenH * 0.6456, screenW * 0.9694, (screenH * 0.6000) - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(screenW * 0.9400, screenH * 0.6000, screenW * 0.0294, screenH * 0.0456, tocolor(239, 0, 5, 255), false) if isCursorOnElement(screenW * 0.7788, screenH * 0.6567, screenW * 0.2013, screenH * 0.0522) then dxDrawImage(screenW * 0.7788, screenH * 0.6567, screenW * 0.2013, screenH * 0.0522, "botao.png", 0, 0, 0, tocolor(255,0,0, 255), false) else dxDrawImage(screenW * 0.7788, screenH * 0.6567, screenW * 0.2013, screenH * 0.0522, "botao.png", 0, 0, 0, tocolor(255,0,0, 120), false) end if isCursorOnElement(screenW * 0.7788, screenH * 0.7200, screenW * 0.2013, screenH * 0.0522) then dxDrawImage(screenW * 0.7788, screenH * 0.7200, screenW * 0.2013, screenH * 0.0522, "botao.png", 0, 0, 0, tocolor(255,0,0, 255), false) else dxDrawImage(screenW * 0.7788, screenH * 0.7200, screenW * 0.2013, screenH * 0.0522, "botao.png", 0, 0, 0, tocolor(255,0,0, 120), false) end if isCursorOnElement(screenW * 0.7788, screenH * 0.7833, screenW * 0.2013, screenH * 0.0522) then dxDrawImage(screenW * 0.7788, screenH * 0.7833, screenW * 0.2013, screenH * 0.0522, "botao.png", 0, 0, 0, tocolor(255,0,0, 255), false) else dxDrawImage(screenW * 0.7788, screenH * 0.7833, screenW * 0.2013, screenH * 0.0522, "botao.png", 0, 0, 0, tocolor(255,0,0, 120), false) end if isCursorOnElement(screenW * 0.7788, screenH * 0.8467, screenW * 0.2013, screenH * 0.0522) then dxDrawImage(screenW * 0.7788, screenH * 0.8467, screenW * 0.2013, screenH * 0.0522, "botao.png", 0, 0, 0, tocolor(255,0,0, 255), false) else dxDrawImage(screenW * 0.7788, screenH * 0.8467, screenW * 0.2013, screenH * 0.0522, "botao.png", 0, 0, 0, tocolor(255,0,0, 120), false) end dxDrawText("Olhar Veiculo", screenW * 0.7788, screenH * 0.6567, screenW * 0.9800, screenH * 0.7089, tocolor(255, 255, 255, 255), 1.00, dxfont0_icons, "center", "center", false, false, false, false, false) dxDrawText("Comprar Veiculo", screenW * 0.7788, screenH * 0.7200, screenW * 0.9800, screenH * 0.7722, tocolor(255, 255, 255, 255), 1.00, dxfont0_icons, "center", "center", false, false, false, false, false) dxDrawText("Alugar Veiculo", screenW * 0.7788, screenH * 0.7833, screenW * 0.9800, screenH * 0.8356, tocolor(255, 255, 255, 255), 1.00, dxfont0_icons, "center", "center", false, false, false, false, false) dxDrawText("Fechar Painel", screenW * 0.7788, screenH * 0.8467, screenW * 0.9800, screenH * 0.8989, tocolor(255, 255, 255, 255), 1.00, dxfont0_icons, "center", "center", false, false, false, false, false) end function DocumentoVeiculo () local VeiculoDentro = getPedOccupiedVehicle(localPlayer) local NomeVeiculo = getVehicleName ( VeiculoDentro ) local IDVeiculo = getVehicleIDFromName(NomeVeiculo) local NomeVeic = getElementData(VeiculoDentro, "TS:NomeCarro") or getVehicleNameFromModel (IDVeiculo) local Dono = getElementData(VeiculoDentro, "TS:Dono") or "Governo" local RGDono = getElementData(VeiculoDentro, "TS:RGDono") or "Error" local Placa = getVehiclePlateText ( VeiculoDentro ) local Ocorrencia = getElementData(VeiculoDentro, "TS:Roubado") or false local Gasolina = getElementData(VeiculoDentro, "fuel") or 0 dxDrawImage(screenW * 0.3470, screenH * 0.1836, screenW * 0.3060, screenH * 0.6341, "doc.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText(Dono, screenW * 0.3990, screenH * 0.3346, screenW * 0.6201, screenH * 0.3854, tocolor(0, 0, 0, 255), 1.00, dxfont0_icons, "center", "center", false, false, false, true, false) dxDrawText(RGDono, screenW * 0.3990, screenH * 0.4245, screenW * 0.5168, screenH * 0.4609, tocolor(0, 0, 0, 255), 1.00, dxfont0_icons, "center", "center", false, false, false, true, false) dxDrawText(Placa, screenW * 0.5351, screenH * 0.4245, screenW * 0.6237, screenH * 0.4609, tocolor(0, 0, 0, 255), 1.00, dxfont0_icons, "center", "center", false, false, false, true, false) dxDrawText("9BW ZZZ377 VT 004251", screenW * 0.3960, screenH * 0.4857, screenW * 0.6237, screenH * 0.5221, tocolor(0, 0, 0, 255), 1.00, dxfont0_icons, "center", "center", false, false, false, true, false) dxDrawText(NomeVeic, screenW * 0.4004, screenH * 0.5547, screenW * 0.5066, screenH * 0.5911, tocolor(0, 0, 0, 255), 1.00, dxfont0_icons, "center", "center", false, false, false, true, false) if Ocorrencia == true then dxDrawText("#FF0000ROUBADO", screenW * 0.5205, screenH * 0.5547, screenW * 0.6266, screenH * 0.5911, tocolor(255, 255, 255, 255), 1.00, dxfont0_icons, "center", "center", false, false, false, true, false) else dxDrawText("#00FF00SEM QUEIXA", screenW * 0.5205, screenH * 0.5547, screenW * 0.6266, screenH * 0.5911, tocolor(255, 255, 255, 255), 1.00, dxfont0_icons, "center", "center", false, false, false, true, false) end dxDrawText(Gasolina.." %", screenW * 0.4078, screenH * 0.6263, screenW * 0.5139, screenH * 0.6628, tocolor(0, 0, 0, 255), 1.00, dxfont0_icons, "center", "center", false, false, false, true, false) dxDrawText("30/12/2022", screenW * 0.5395, screenH * 0.6263, screenW * 0.6230, screenH * 0.6628, tocolor(0, 0, 0, 255), 1.00, dxfont0_icons, "center", "center", false, false, false, true, false) end function PainelLojaCarros2 () exports["Blur"]:dxDrawBluredRectangle(screenW * 0.2175, screenH * 0.2122, screenW * 0.2350, screenH * 0.5067, tocolor(255, 255, 255, 230)) dxDrawRectangle(screenW * 0.2175, screenH * 0.2122, screenW * 0.2350, screenH * 0.5067, tocolor(0, 0, 0, 114), false) dxDrawRectangle(screenW * 0.2175, screenH * 0.2122, screenW * 0.2350, screenH * 0.0567, tocolor(0, 0, 0, 175), false) dxDrawLine(screenW * 0.2175, screenH * 0.2689, screenW * 0.4525, screenH * 0.2689, tocolor(255,0,0, 255), 3, false) dxDrawText("Garagem De Veiculos", screenW * 0.2175, screenH * 0.2122, screenW * 0.4525, screenH * 0.2689, tocolor(255, 255, 255, 255), 1.00, dxfont0_icons, "center", "center", false, false, true, false, false) if isCursorOnElement(screenW * 0.2219, screenH * 0.5233, screenW * 0.2213, screenH * 0.0522) then dxDrawImage(screenW * 0.2219, screenH * 0.5233, screenW * 0.2213, screenH * 0.0522, "botao.png", 0, 0, 0, tocolor(255,0,0, 255), false) else dxDrawImage(screenW * 0.2219, screenH * 0.5233, screenW * 0.2213, screenH * 0.0522, "botao.png", 0, 0, 0, tocolor(255,0,0, 120), false) end if isCursorOnElement(screenW * 0.2219, screenH * 0.5867, screenW * 0.2213, screenH * 0.0522) then dxDrawImage(screenW * 0.2219, screenH * 0.5867, screenW * 0.2213, screenH * 0.0522, "botao.png", 0, 0, 0, tocolor(255,0,0, 255), false) else dxDrawImage(screenW * 0.2219, screenH * 0.5867, screenW * 0.2213, screenH * 0.0522, "botao.png", 0, 0, 0, tocolor(255,0,0, 120), false) end if isCursorOnElement(screenW * 0.2219, screenH * 0.6500, screenW * 0.2213, screenH * 0.0522) then dxDrawImage(screenW * 0.2219, screenH * 0.6500, screenW * 0.2213, screenH * 0.0522, "botao.png", 0, 0, 0, tocolor(255,0,0, 255), false) else dxDrawImage(screenW * 0.2219, screenH * 0.6500, screenW * 0.2213, screenH * 0.0522, "botao.png", 0, 0, 0, tocolor(255,0,0, 120), false) end dxDrawText("Pegar Veiculo", screenW * 0.2219, screenH * 0.5233, screenW * 0.4431, screenH * 0.5756, tocolor(255, 255, 255, 255), 1.00, dxfont0_icons, "center", "center", false, false, false, false, false) dxDrawText("Guardar Veiculo", screenW * 0.2219, screenH * 0.5867, screenW * 0.4431, screenH * 0.6389, tocolor(255, 255, 255, 255), 1.00, dxfont0_icons, "center", "center", false, false, false, false, false) dxDrawText("Fechar Painel", screenW * 0.2219, screenH * 0.6500, screenW * 0.4431, screenH * 0.7022, tocolor(255, 255, 255, 255), 1.00, dxfont0_icons, "center", "center", false, false, false, false, false) end painelpresentear = false function PainelEnviar () exports["Blur"]:dxDrawBluredRectangle(screenW * 0.0205, screenH * 0.2604, screenW * 0.2130, screenH * 0.3555, tocolor(255, 255, 255, 230)) dxDrawRectangle(screenW * 0.0205, screenH * 0.2604, screenW * 0.2130, screenH * 0.3555, tocolor(0, 0, 0, 135), false) dxDrawRectangle(screenW * 0.0205, screenH * 0.2604, screenW * 0.2130, screenH * 0.0534, tocolor(0, 0, 0, 173), false) dxDrawLine(screenW * 0.0205, screenH * 0.3138, screenW * 0.2335, screenH * 0.3138, tocolor(255,0,0, 255), 3, false) dxDrawText("Vender Veiculo", screenW * 0.0205, screenH * 0.2604, screenW * 0.2335, screenH * 0.3138, tocolor(255, 255, 255, 255), 1.00, dxfont0_OpenSans_Bold, "center", "center", false, false, false, false, false) -- dxDrawText("Sistema desenvolvido por #00FF00@TioSteiNScripter", screenW * 0.0205, screenH * 0.5820, screenW * 0.2335, screenH * 0.6159, tocolor(255, 255, 255, 255), 1.00, dxfont1_OpenSans_Bold, "center", "center", false, false, false, true, false) dxDrawLine((screenW * 0.0622) - 1, (screenH * 0.4063) - 1, (screenW * 0.0622) - 1, screenH * 0.4701, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(screenW * 0.1977, (screenH * 0.4063) - 1, (screenW * 0.0622) - 1, (screenH * 0.4063) - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine((screenW * 0.0622) - 1, screenH * 0.4701, screenW * 0.1977, screenH * 0.4701, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(screenW * 0.1977, screenH * 0.4701, screenW * 0.1977, (screenH * 0.4063) - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine((screenW * 0.0622) - 1, (screenH * 0.4922) - 1, (screenW * 0.0622) - 1, screenH * 0.5560, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(screenW * 0.1977, (screenH * 0.4922) - 1, (screenW * 0.0622) - 1, (screenH * 0.4922) - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine((screenW * 0.0622) - 1, screenH * 0.5560, screenW * 0.1977, screenH * 0.5560, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(screenW * 0.1977, screenH * 0.5560, screenW * 0.1977, (screenH * 0.4922) - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawEditBox("Digite o RG do jogador", screenW * 0.0278, screenH * 0.3346, screenW * 0.1984, screenH * 0.0534, false, 10, RGEnviar) if isCursorOnElement(screenW * 0.0622, screenH * 0.4063, screenW * 0.1354, screenH * 0.0638) then dxDrawRectangle(screenW * 0.0622, screenH * 0.4063, screenW * 0.1354, screenH * 0.0638, tocolor(255,0,0, 255), false) else dxDrawRectangle(screenW * 0.0622, screenH * 0.4063, screenW * 0.1354, screenH * 0.0638, tocolor(255,0,0, 120), false) end if isCursorOnElement(screenW * 0.0622, screenH * 0.4922, screenW * 0.1354, screenH * 0.0638) then dxDrawRectangle(screenW * 0.0622, screenH * 0.4922, screenW * 0.1354, screenH * 0.0638, tocolor(255,0,0, 255), false) else dxDrawRectangle(screenW * 0.0622, screenH * 0.4922, screenW * 0.1354, screenH * 0.0638, tocolor(255,0,0, 120), false) end dxDrawText("Enviar", screenW * 0.0622, screenH * 0.4036, screenW * 0.1977, screenH * 0.4701, tocolor(255, 255, 255, 255), 1.00, dxfont0_OpenSans_Bold, "center", "center", false, false, false, false, false) dxDrawText("Fechar", screenW * 0.0622, screenH * 0.4896, screenW * 0.1977, screenH * 0.5560, tocolor(255, 255, 255, 255), 1.00, dxfont0_OpenSans_Bold, "center", "center", false, false, false, false, false) end function Painel3 () exports["Blur"]:dxDrawBluredRectangle(screenW * 0.0187, screenH * 0.2156, screenW * 0.2162, screenH * 0.4433, tocolor(255, 255, 255, 230)) dxDrawRectangle(screenW * 0.0187, screenH * 0.2156, screenW * 0.2162, screenH * 0.4433, tocolor(0, 0, 0, 114), false) dxDrawRectangle(screenW * 0.0187, screenH * 0.2156, screenW * 0.2162, screenH * 0.0578, tocolor(0, 0, 0, 175), false) dxDrawLine(screenW * 0.0187, screenH * 0.2733, screenW * 0.2350, screenH * 0.2733, tocolor(255,0,0, 255), 3, false) dxDrawText("Gerenciamento de Veiculos", screenW * 0.0187, screenH * 0.2156, screenW * 0.2350, screenH * 0.2733, tocolor(255, 255, 255, 255), 1.00, dxfont0_icons, "center", "center", false, false, false, false, false) if isCursorOnElement(screenW * 0.0238, screenH * 0.5056, screenW * 0.1000, screenH * 0.0544) then dxDrawImage(screenW * 0.0238, screenH * 0.5056, screenW * 0.1000, screenH * 0.0544, "botao.png", 0, 0, 0, tocolor(255,0,0, 255), false) else dxDrawImage(screenW * 0.0238, screenH * 0.5056, screenW * 0.1000, screenH * 0.0544, "botao.png", 0, 0, 0, tocolor(255,0,0, 120), false) end if isCursorOnElement(screenW * 0.1288, screenH * 0.5056, screenW * 0.1000, screenH * 0.0544) then dxDrawImage(screenW * 0.1288, screenH * 0.5056, screenW * 0.1000, screenH * 0.0544, "botao.png", 0, 0, 0, tocolor(255,0,0, 255), false) else dxDrawImage(screenW * 0.1288, screenH * 0.5056, screenW * 0.1000, screenH * 0.0544, "botao.png", 0, 0, 0, tocolor(255,0,0, 120), false) end if isCursorOnElement(screenW * 0.0238, screenH * 0.5711, screenW * 0.2050, screenH * 0.0544) then dxDrawImage(screenW * 0.0238, screenH * 0.5711, screenW * 0.2050, screenH * 0.0544, "botao.png", 0, 0, 0, tocolor(255,0,0, 255), false) else dxDrawImage(screenW * 0.0238, screenH * 0.5711, screenW * 0.2050, screenH * 0.0544, "botao.png", 0, 0, 0, tocolor(255,0,0, 120), false) end dxDrawText("Enviar p/ Player", screenW * 0.0238, screenH * 0.5022, screenW * 0.1237, screenH * 0.5600, tocolor(255, 255, 255, 255), 1.00, dxfont0_icons, "center", "center", false, false, false, false, false) dxDrawText("Vender p/ Conce", screenW * 0.1288, screenH * 0.5022, screenW * 0.2288, screenH * 0.5600, tocolor(255, 255, 255, 255), 1.00, dxfont0_icons, "center", "center", false, false, false, false, false) dxDrawText("Localizar Veiculo", screenW * 0.0238, screenH * 0.5711, screenW * 0.2288, screenH * 0.6256, tocolor(255, 255, 255, 255), 1.00, dxfont0_icons, "center", "center", false, false, false, false, false) end addEventHandler("onClientKey", root, function (button, press) local Perm = getElementData(getLocalPlayer(),"TS:Painel") or nil if Perm ~= nil then if button == "F1" or button == "F2" or button == "F3" or button == "F4" or button == "F5" or button == "F6" or button == "F7" or button == "b" or button == "F9" or button == "F10" or button == "F11" or button == "F12" or button == "a" or button == "shift" or button == "cntrl" or button == "alt" then cancelEvent() end end end ) addEventHandler("onClientResourceStart", resourceRoot, function () ListaLojaCarros = dxGridW:Create(352, 247, 367, 218) ListaLojaCarros:AddColumn("Veiculo", 100) ListaLojaCarros:AddColumn("Valor", 130) ListaLojaCarros:AddColumn("ID", 30) ListaLojaCarros:AddColumn("Slot", 500) ListaLojaCarros:AddColumn("Status", 100) ListaLojaCarros:SetVisible(false) ListaLojaCarros2 = dxGridW:Create(36, 250, 334, 200) ListaLojaCarros2:AddColumn("Veiculo", 100) ListaLojaCarros2:AddColumn("Valor", 100) ListaLojaCarros2:AddColumn("ID", 30) ListaLojaCarros2:AddColumn("Slot", 500) ListaLojaCarros2:AddColumn("Status", 75) ListaLojaCarros2:SetVisible(false) Lista_VeiculosLoja = dxGridW:Create(1240, 240, 340, 290) Lista_VeiculosLoja:AddColumn("Veiculo", 130) Lista_VeiculosLoja:AddColumn("Valor", 100) Lista_VeiculosLoja:AddColumn("Aluguel", 120) Lista_VeiculosLoja:AddColumn("ID", 30) Lista_VeiculosLoja:SetVisible(false) for i, Veiculos in ipairs (VeiculosAVenda) do Lista_VeiculosLoja:AddItem(1, Veiculos[2].."") Lista_VeiculosLoja:AddItem(2, ""..Veiculos[3].."") Lista_VeiculosLoja:AddItem(3, ""..Veiculos[4].."") Lista_VeiculosLoja:AddItem(4, ""..Veiculos[1].."") end end) function Reload_LojaCarros () ListaLojaCarros:Clear(true) ListaLojaCarros2:Clear(true) local data = getElementData(localPlayer, "TS:VeiculosInfo") for i, data in ipairs (data) do local Valor = data['Valor'] local IDVeiculo = data['IDVeiculo'] local NomeVeiculo = data['NomeVeiculo'] local Status = data['Status'] local Emplacamento = data['ID'] ListaLojaCarros:AddItem(1, NomeVeiculo.."") ListaLojaCarros:AddItem(2, ""..Valor.."") ListaLojaCarros:AddItem(3, ""..IDVeiculo.."") ListaLojaCarros:AddItem(4, ""..Emplacamento) ListaLojaCarros:AddItem(5, Status.."") ListaLojaCarros2:AddItem(1, NomeVeiculo.."") ListaLojaCarros2:AddItem(2, ""..Valor.."") ListaLojaCarros2:AddItem(3, ""..IDVeiculo.."") ListaLojaCarros2:AddItem(4, ""..Emplacamento) ListaLojaCarros2:AddItem(5, Status.."") end end paineldocumentos = false --[[ ><><><><><><><><><><><><><><><><><><><>< ><Configurações N Altere>< ><><><><><><><><><><><><><><><><><><><>< --]] function AbrirPresentear () if painelpresentear == false then addEventHandler ( "onClientRender", root, PainelEnviar ) painelpresentear = true showCursor ( true ) playSoundFrontEnd ( 43 ) setElementData(RGEnviar, "text2", "") setElementData(RGEnviar, "state", true) else removeEventHandler ( "onClientRender", root, PainelEnviar ) painelpresentear = false showCursor ( false ) playSoundFrontEnd ( 43 ) end end function AbrirDoc () if paineldocumentos == false then addEventHandler ( "onClientRender", root, DocumentoVeiculo ) paineldocumentos = true showCursor ( true ) playSoundFrontEnd ( 43 ) else removeEventHandler ( "onClientRender", root, DocumentoVeiculo ) paineldocumentos = false showCursor ( false ) playSoundFrontEnd ( 43 ) end end addEvent ("TS:AbrirDoc", true) addEventHandler ("TS:AbrirDoc", root, AbrirDoc) function convertTime(ms) local min = math.floor ( ms/60000 ) local sec = math.floor( (ms/1000)%60 ) return min, sec end function AbrirComprarCarro () if not painel then addEventHandler ("onClientRender", root, PainelLojaCarros) painel = true showCursor (painel) playSoundFrontEnd (43) Lista_VeiculosLoja:SetVisible(true) end end addEvent ("TS:AbrirComprarCarro", true) addEventHandler ("TS:AbrirComprarCarro", root, AbrirComprarCarro) function AbrirLojaCarros2 () tick = getTickCount() if painel2 == false then addEventHandler ( "onClientRender", root, PainelLojaCarros2 ) painel2 = true showCursor ( true ) playSoundFrontEnd ( 43 ) ListaLojaCarros:SetVisible(true) Reload_LojaCarros() showChat(false) else FecharLojaCarros2() end end addEvent ("TS:AbrirLojaCarros2", true) addEventHandler ("TS:AbrirLojaCarros2", root, AbrirLojaCarros2) function AbrirLojaCarros3 () if painel2 == false then addEventHandler ( "onClientRender", root, Painel3 ) painel2 = true showCursor ( true ) playSoundFrontEnd ( 43 ) ListaLojaCarros2:SetVisible(true) Reload_LojaCarros() showChat(false) else removeEventHandler("onClientRender", root, Painel3 ) showChat(true) showCursor (false) playSoundFrontEnd ( 43 ) painel2 = false ListaLojaCarros2:SetVisible(false) end end bindKey("F5", "down", AbrirLojaCarros3) function ClicandoF5(_, state) if painel2 == true then local gridItem = ListaLojaCarros2:GetSelectedItem() if gridItem then if isCursorOnElement(screenW * 0.0238, screenH * 0.5056, screenW * 0.1000, screenH * 0.0544) then -------- Presentear local NomeDoCarro = ListaLojaCarros2:GetItemDetails(1, gridItem, 1) local IDDoCarro = ListaLojaCarros2:GetItemDetails(3, gridItem, 3) local ValorDoCarro = ListaLojaCarros2:GetItemDetails(2, gridItem, 2) local SlotCarro = ListaLojaCarros2:GetItemDetails(4, gridItem, 4) setElementData(localPlayer, "TS:NomeCarroAVenda", NomeDoCarro) setElementData(localPlayer, "TS:IDCarroAVenda", IDDoCarro) setElementData(localPlayer, "TS:SlotCarroAVenda", SlotCarro) setElementData(localPlayer, "TS:ValorCarroAVenda", ValorDoCarro) playSoundFrontEnd ( 43 ) AbrirPresentear() removeEventHandler("onClientRender", root, Painel3 ) showCursor (false) playSoundFrontEnd ( 43 ) painel2 = false ListaLojaCarros2:SetVisible(false) showChat(true) elseif isCursorOnElement(screenW * 0.1288, screenH * 0.5056, screenW * 0.1000, screenH * 0.0544) then ---- Vender Conce local NomeDoCarro = ListaLojaCarros2:GetItemDetails(1, gridItem, 1) local IDDoCarro = ListaLojaCarros2:GetItemDetails(3, gridItem, 3) playSoundFrontEnd ( 43 ) triggerServerEvent( 'TS:VenderVeiculoConce', getLocalPlayer(), localPlayer, IDDoCarro, NomeDoCarro) removeEventHandler("onClientRender", root, Painel3 ) showCursor (false) playSoundFrontEnd ( 43 ) painel2 = false ListaLojaCarros2:SetVisible(false) showChat(true) elseif isCursorOnElement(screenW * 0.0238, screenH * 0.5711, screenW * 0.2050, screenH * 0.0544) then ---- Localizar local NomeDoCarro = ListaLojaCarros2:GetItemDetails(1, gridItem, 1) local ValorCarro = ListaLojaCarros2:GetItemDetails(2, gridItem, 2) local IDDoCarro = ListaLojaCarros2:GetItemDetails(3, gridItem, 3) local SlotCarro = ListaLojaCarros2:GetItemDetails(4, gridItem, 4) playSoundFrontEnd ( 43 ) triggerServerEvent( 'TS:LocalizarVeiculo', getLocalPlayer(), localPlayer, NomeDoCarro, IDDoCarro, SlotCarro,ValorCarro) removeEventHandler("onClientRender", root, Painel3 ) showCursor (false) playSoundFrontEnd ( 43 ) painel2 = false ListaLojaCarros2:SetVisible(false) showChat(true) end end end end addEventHandler ("onClientClick", root, ClicandoF5 ) function FecharLojaCarros (_,state) if painel == true then if isCursorOnElement ( screenW * 0.7788, screenH * 0.8467, screenW * 0.2013, screenH * 0.0522 ) then if isElement(Veiculo[localPlayer]) then destroyElement(Veiculo[localPlayer]) end removeEventHandler("onClientRender", root, PainelLojaCarros ) showCursor (false) playSoundFrontEnd ( 43 ) setElementPosition(localPlayer, 1797.9475097656,-1777.2038574219,13.701637268066) painel = false Lista_VeiculosLoja:SetVisible(false) setCameraTarget(localPlayer) end end end addEventHandler ("onClientClick", root, FecharLojaCarros ) function FecharEnviar (_,state) if painelpresentear == true then if isCursorOnElement ( screenW * 0.0622, screenH * 0.4922, screenW * 0.1354, screenH * 0.0638 ) then removeEventHandler("onClientRender", root, PainelEnviar ) showCursor (false) playSoundFrontEnd ( 43 ) painelpresentear = false end end end addEventHandler ("onClientClick", root, FecharEnviar ) function FecharLojaCarros2 (_,state) if painel2 == true then if isCursorOnElement ( screenW * 0.2219, screenH * 0.6500, screenW * 0.2213, screenH * 0.0522 ) then removeEventHandler("onClientRender", root, PainelLojaCarros2 ) showChat(true) showCursor (false) playSoundFrontEnd ( 43 ) painel2 = false ListaLojaCarros:SetVisible(false) end end end addEventHandler ("onClientClick", root, FecharLojaCarros2 ) function TrocarCor ( _,state ) if painel == true then if state == "down" then if isCursorOnElement(screenW * 0.7875, screenH * 0.6000, screenW * 0.0294, screenH * 0.0456) then if isElement(Veiculo[localPlayer]) then setVehicleColor(Veiculo[localPlayer], 255, 255, 255, 255, 255, 255) end elseif isCursorOnElement(screenW * 0.8256, screenH * 0.6000, screenW * 0.0294, screenH * 0.0456) then if isElement(Veiculo[localPlayer]) then setVehicleColor(Veiculo[localPlayer], 0, 0, 0, 0, 0, 0) end elseif isCursorOnElement(screenW * 0.8638, screenH * 0.6000, screenW * 0.0294, screenH * 0.0456) then if isElement(Veiculo[localPlayer]) then setVehicleColor(Veiculo[localPlayer], 0, 28, 241, 0, 28, 241) end elseif isCursorOnElement(screenW * 0.9019, screenH * 0.6000, screenW * 0.0294, screenH * 0.0456) then if isElement(Veiculo[localPlayer]) then setVehicleColor(Veiculo[localPlayer], 34, 240, 0, 34, 240, 0) end elseif isCursorOnElement(screenW * 0.9400, screenH * 0.6000, screenW * 0.0294, screenH * 0.0456) then if isElement(Veiculo[localPlayer]) then setVehicleColor(Veiculo[localPlayer], 239, 0, 5, 239, 0, 5) end end end end end addEventHandler ( "onClientClick", root, TrocarCor ) Timer = {} function OlharVeiculo ( _,state ) if painel == true then if state == "down" then if isCursorOnElement(screenW * 0.7788, screenH * 0.6567, screenW * 0.2013, screenH * 0.0522) then if isElement(Veiculo[localPlayer]) then destroyElement(Veiculo[localPlayer]) end local gridItem = Lista_VeiculosLoja:GetSelectedItem() if gridItem then local IDDoCarro = Lista_VeiculosLoja:GetItemDetails(4, gridItem, 4) if isElement(Timer[localPlayer]) then killTimer(Timer[localPlayer]) end Veiculo[localPlayer] = createVehicle(IDDoCarro, 1713.89392, -1138.08679, 24.07813) setCameraMatrix(1715.93567, -1126.55969, 27.51149,0,-8120,-2110) setVehicleColor(Veiculo[localPlayer], 255, 255, 255) setVehiclePlateText(Veiculo[localPlayer], "Loja") Loop(localPlayer) end end end end end addEventHandler ( "onClientClick", root, OlharVeiculo ) function Loop(source) Timer[source] = setTimer(function() if not isElement(Veiculo[source]) then return end local Rot1, Rot2, Rot3 = getElementRotation(Veiculo[source]) setElementRotation(Veiculo[source], Rot1 , Rot2, Rot3+1) end ,22, 0) end function Alugar ( _,state ) if painel == true then if state == "down" then if isCursorOnElement(screenW * 0.7788, screenH * 0.7833, screenW * 0.2013, screenH * 0.0522) then local gridItem = Lista_VeiculosLoja:GetSelectedItem() if gridItem then local NomeVeiculo = Lista_VeiculosLoja:GetItemDetails(1, gridItem, 1) local ValorVeiculo = Lista_VeiculosLoja:GetItemDetails(2, gridItem, 2) local AluguelVeiculo = Lista_VeiculosLoja:GetItemDetails(3, gridItem, 3) local IDDoCarro = Lista_VeiculosLoja:GetItemDetails(4, gridItem, 4) if isElement(Veiculo[localPlayer]) then local r1, g1, b1, r2, g2, b2 = getVehicleColor(Veiculo[localPlayer], true) or 255, 255, 255, 255, 255, 255 end if isElement(Veiculo[localPlayer]) then destroyElement(Veiculo[localPlayer]) end removeEventHandler("onClientRender", root, PainelLojaCarros ) showCursor (false) playSoundFrontEnd ( 43 ) painel = false Lista_VeiculosLoja:SetVisible(false) setCameraTarget(localPlayer) triggerServerEvent("TS:AlugarVeiculo", getLocalPlayer(), localPlayer, NomeVeiculo, ValorVeiculo, AluguelVeiculo, IDDoCarro, r1, g1, b1, r2, g2, b2) end end end end end addEventHandler ( "onClientClick", root, Alugar ) function Comprar ( _,state ) if painel == true then if state == "down" then if isCursorOnElement(screenW * 0.7788, screenH * 0.7200, screenW * 0.2013, screenH * 0.0522) then local gridItem = Lista_VeiculosLoja:GetSelectedItem() if gridItem then local NomeVeiculo = Lista_VeiculosLoja:GetItemDetails(1, gridItem, 1) local ValorVeiculo = Lista_VeiculosLoja:GetItemDetails(2, gridItem, 2) local AluguelVeiculo = Lista_VeiculosLoja:GetItemDetails(3, gridItem, 3) local IDDoCarro = Lista_VeiculosLoja:GetItemDetails(4, gridItem, 4) if isElement(Veiculo[localPlayer]) then local r1, g1, b1, r2, g2, b2 = getVehicleColor(Veiculo[localPlayer], true) or 255, 255, 255, 255, 255, 255 end if isElement(Veiculo[localPlayer]) then destroyElement(Veiculo[localPlayer]) end removeEventHandler("onClientRender", root, PainelLojaCarros ) showCursor (false) playSoundFrontEnd ( 43 ) painel = false Lista_VeiculosLoja:SetVisible(false) setCameraTarget(localPlayer) triggerServerEvent("TS:ComprarVeiculo", getLocalPlayer(), localPlayer, NomeVeiculo, ValorVeiculo, AluguelVeiculo, IDDoCarro, r1, g1, b1, r2, g2, b2) end end end end end addEventHandler ( "onClientClick", root, Comprar ) function ClicandoGaragem (_,state) if painel2 == true then if state == "down" then if not ListaLojaCarros:GetSelectedItem() then return end if isCursorOnElement ( screenW * 0.2219, screenH * 0.5233, screenW * 0.2213, screenH * 0.0522 ) then -------- Pegar Veiculo local gridItem = ListaLojaCarros:GetSelectedItem() local NomeDoCarro = ListaLojaCarros:GetItemDetails(1, gridItem, 1) local ValorCarro = ListaLojaCarros:GetItemDetails(2, gridItem, 2) local IDDoCarro = ListaLojaCarros:GetItemDetails(3, gridItem, 3) local SlotCarro = ListaLojaCarros:GetItemDetails(4, gridItem, 4) playSoundFrontEnd ( 43 ) triggerServerEvent( 'TS:PegarVeiculo', getLocalPlayer(), localPlayer, NomeDoCarro, IDDoCarro, SlotCarro,ValorCarro) removeEventHandler("onClientRender", root, PainelLojaCarros2 ) showCursor (false) playSoundFrontEnd ( 43 ) painel2 = false ListaLojaCarros:SetVisible(false) showChat(true) elseif isCursorOnElement(screenW * 0.2219, screenH * 0.5867, screenW * 0.2213, screenH * 0.0522) then -------- Guardar Veiculo local gridItem = ListaLojaCarros:GetSelectedItem() local NomeDoCarro = ListaLojaCarros:GetItemDetails(1, gridItem, 1) local IDDoCarro = ListaLojaCarros:GetItemDetails(3, gridItem, 3) local SlotCarro = ListaLojaCarros:GetItemDetails(4, gridItem, 4) playSoundFrontEnd ( 43 ) triggerServerEvent( 'TS:GuardarVeiculo', getLocalPlayer(), localPlayer, NomeDoCarro, IDDoCarro, SlotCarro) removeEventHandler("onClientRender", root, PainelLojaCarros2 ) showCursor (false) playSoundFrontEnd ( 43 ) painel2 = false ListaLojaCarros:SetVisible(false) showChat(true) end end end end addEventHandler ("onClientClick", root, ClicandoGaragem ) function EnviarCarro (_, state) if painelpresentear == true then if state == "down" then if isCursorOnElement ( screenW * 0.0622, screenH * 0.4063, screenW * 0.1354, screenH * 0.0638 ) then local getID = tonumber(getElementData(RGEnviar, "text2")) local IDCar = getElementData(localPlayer, "TS:IDCarroAVenda") or 0 local NameCar = getElementData(localPlayer, "TS:NomeCarroAVenda") or nil if type(getID) == "number" then AbrirPresentear () triggerServerEvent( 'TS:EnviarVeiculo', getLocalPlayer(), localPlayer, getID, IDCar, NameCar) end end end end end addEventHandler ("onClientClick", root, EnviarCarro ) function isCursorOnElement ( x, y, w, h ) 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 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 function getVehicleModelFromNewName (name) for i,v in pairs ( customCarNames ) do if v == name then return i end end return false end painelroubo = false function PainelTranca () local barra = interpolateBetween(0, 0, 0, 0.2613, 0, 0, (getTickCount()-tick)/1/60000, "Linear") exports["Blur"]:dxDrawBluredRectangle(screenW * 0.3214, screenH * 0.4661, screenW * 0.3572, screenH * 0.0677, tocolor(255, 255, 255, 230)) dxDrawLine((screenW * 0.3214) - 1, (screenH * 0.4661) - 1, (screenW * 0.3214) - 1, screenH * 0.5339, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(screenW * 0.6786, (screenH * 0.4661) - 1, (screenW * 0.3214) - 1, (screenH * 0.4661) - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine((screenW * 0.3214) - 1, screenH * 0.5339, screenW * 0.6786, screenH * 0.5339, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(screenW * 0.6786, screenH * 0.5339, screenW * 0.6786, (screenH * 0.4661) - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(screenW * 0.3214, screenH * 0.4661, screenW * 0.3572, screenH * 0.0677, tocolor(0, 0, 0, 147), false) dxDrawRectangle(screenW * 0.3214, screenH * 0.4661, screenW * barra, screenH * 0.0677, tocolor(0, 85, 227, 170), false) dxDrawText("Roubando veiculo....", screenW * 0.3214, screenH * 0.4661, screenW * 0.6786, screenH * 0.5339, tocolor(255, 255, 255, 255), 1.00, dxfont0_icons, "center", "center", false, false, false, false, false) end function AbrirRouboVeiculo () tick = getTickCount() if painelroubo == false then addEventHandler ( "onClientRender", root, PainelTranca ) painelroubo = true showCursor ( true ) playSoundFrontEnd ( 43 ) else removeEventHandler ( "onClientRender", root, PainelTranca ) painelroubo = false showCursor ( false ) playSoundFrontEnd ( 43 ) end end addEvent ("TS:AbrirRouboVeiculo", true) addEventHandler ("TS:AbrirRouboVeiculo", root, AbrirRouboVeiculo) function BloquearTecla(key) if painelroubo == true and (key:upper() == "lshift") then cancelEvent() end end addEventHandler("onClientKey", root, BloquearTecla) function BloquearTecla2(key) if painelroubo == true and (key:upper() == "rshift") then cancelEvent() end end addEventHandler("onClientKey", root, BloquearTecla2) local drawDistance = 15 g_StreamedInPlayers = {} function onClientRender() local cx, cy, cz, lx, ly, lz = getCameraMatrix() for k, player in pairs(g_StreamedInPlayers) do if isElement(player) and isElementStreamedIn(player) then do local Placa = getElementData(localPlayer, "TS:Placa") or "Ativa" if Placa ~= "Ativa" then return end local vx, vy, vz = getElementPosition(player, 4) local dist = getDistanceBetweenPoints3D(cx, cy, cz, vx, vy, vz) if dist < drawDistance and isLineOfSightClear(cx, cy, cz, vx, vy, vz, true, false, false) then local x, y = getScreenFromWorldPosition(vx, vy, vz) if x and y then local ID = getVehiclePlateText(player) local w = dxGetTextWidth(ID, 0.1, "default-bold") local h = dxGetFontHeight(1, "default-bold") if getElementData(player, "TS:Roubado") == true then dxDrawText(ID, x , y, w, h, tocolor(255, 0, 0), 1.20, "default-bold", "left", "top", false, false, false, false, false) else dxDrawText(ID, x , y, w, h, tocolor(255, 255, 255), 1.20, "default-bold", "left", "top", false, false, false, false, false) end CorTag = tocolor(255, 255, 255) end end end else table.remove(g_StreamedInPlayers, k) end end end addEventHandler("onClientRender", root, onClientRender) function onClientElementStreamIn() if getElementType(source) == "vehicle" and source ~= getLocalPlayer() then setPlayerNametagShowing(source, false) table.insert(g_StreamedInPlayers, source) end end addEventHandler("onClientElementStreamIn", root, onClientElementStreamIn) function onClientResourceStart(startedResource) visibleTick = getTickCount() counter = 0 local players = getElementsByType("vehicle") for k, v in pairs(players) do if isElementStreamedIn(v) then setPlayerNametagShowing(v, false) table.insert(g_StreamedInPlayers, v) end end end addEventHandler("onClientResourceStart", resourceRoot, onClientResourceStart)
  2. Ola, Eu tenho um script de modo passivo no meu servidor, Basicamente, quando o jogador entra no modo passivo ele nao morre e nao mata, Eu queria colocar esse script pra quando o jogador entra no modo passivo aparecer escrito no corpo dele MODO PASSIVO. Para quando os jogadores verem ele saberem que ele está em modo passivo, Nao entendo muito de script e coloque o arquivo lua e o arquivo do servidor aqui, OBRIGADO QUEM PODER AJUDAR! CLIENT.LUA local sx, sy = guiGetScreenSize () local x, y = (sx / 1920), (sy / 1080) fonte local = dxCreateFont ("font / font.ttf", 10) painelpa2 = falsa função painelpa () local cor1 = tocolor (1, 0, 0, 198) se isCursorOnElement (x * 754, y * 691, x * 165, y * 63) então cor1 = tocolor (254, 1, 49, 182) else cor1 = tocolor (1, 0, 0, 198) end dxDrawLine (x * 666 - 1, y * 105 - 1, x * 666 - 1, y * 803, tocolor (0, 0, 0, 255) , 1, falso) dxDrawLine (x * 1368, y * 105 - 1, x * 666 - 1, y * 105 - 1, tocolor (0, 0, 0, 255), 1, falso) dxDrawLine (x * 666 - 1, y * 803, x * 1368, y * 803, tocolor (0, 0, 0, 255), 1, falso) dxDrawLine (x * 1368, y * 803, x * 1368, y * 105-1, tocolor (0, 0, 0, 255), 1, falso) dxDrawRectangle (x * 666, y * 105, x * 702, y * 698, tocolor (1, 0, 0, 198), falso) dxDrawLine (x * 666 - 1, y * 105 - 1, x * 666 - 1, y * 165, tocolor (0, 0, 0, 255), 1, falso) dxDrawLine (x * 1368, y * 105 - 1 , x * 666 - 1, y * 105 - 1, tocolor (0, 0, 0, 255), 1, falso) dxDrawLine (x * 666 - 1, y * 165, x * 1368, y * 165, tocolor ( 0, 0, 0, 255), 1, falso) dxDrawLine (x * 1368, y * 165, x * 1368, y * 105 - 1, tocolor (0, 0, 0, 255), 1, falso) dxDrawRectangle ( x * 666, y * 105, x * 702, y * 60, tocolor (255, 140, 0, 240), false) dxDrawText ("Passivo - Jogue tranquilamente, de um rolê pelo servidor. \ nNeste modo você não pode matar , roubar, nem morrer ... ", x * 754, y * 233, x * 1270, y * 284, tocolor (255, 255, 255, 255), x * 1,50," arial "," esquerda "," center ", falso, falso, falso, falso, falso) dxDrawText ("Ativo - Jogue intensamente, Mate, roube, de fuga dos corps. \ nNeste modo você pode matar, roubar, morrer ...", x * 754, y * 284, x * 1270, y * 335, tocolor ( 255, 255, 255, 255), x * 1,50, "arial", "esquerda", "centro", falso, falso, falso, falso, falso) dxDrawText ("Passivo e Ativo - BRASILEIROS VIVENDO SEM LIMITES", x * 754, y * 109, x * 1270, y * 160, tocolor (254, 254, 254, 254), x * 1,50, fonte, "centro", "centro", falso, falso, falso, falso, falso) dxDrawRectangle (x * 754, y * 691, x * 165, y * 63, cor1, falso) dxDrawText ("Selecionar", x * 755, y * 692, x * 919, y * 754, tocolor (255, 255, 255 , 255), x * 1,30, fonte, "centro", "centro", falso, falso, falso, falso, falso) fim Modos locais = { {"Passivo"}, {"Ativo"}, } addEventHandler ("onClientResourceStart", resourceRoot, function () Lista_Pa = dxGridW: Create (754, 350, 516, 296) Lista_Pa: AddColumn ("Modos", 500) Lista_Pa: SetVisible (false) end) function Refresh_Grid () Lista_Pa: Clear (true) para i = 1, #Modos do Lista_Pa: AddItem (1, "" ..Modos [1]) fim fim function AbrirPainel () if painelpa2 == false then addEventHandler ("onClientRender", root, painelpa) painelpa2 = true showCursor (true) Lista_Pa: SetVisible (true) Refresh_Grid () else removeEventHandler ("onClientRender", root, painelpa) painelpa2 = showCursor (false) Lista_Pa: SetVisible (false) Refresh_Grid () end end addEvent ("BS: PainelAtivo", true) addEventHandler ("BS: PainelAtivo", getRootElement (), AbrirPainel) função onClick (botão, estado, thePlayer) if painelpa2 == true then if state == "down" then if isCursorOnElement (x * 754, y * 691, x * 165, y * 63) then gridItem local = Lista_Pa: GetSelectedItem ( ) local ModoSelecionada = Lista_Pa: GetItemDetails (1, gridItem, 1) ou nulo se ModoSelecionada == "Passivo" then toggleControl ("fire", false) toggleControl ("vehicle_secondary_fire", false) toggleControl ("vehicle_fire", false) toggleControl ( "aim_weapon", false) setElementData (getLocalPlayer (), "Modo", "Passivo") AbrirPainel () elseif ModoSelecionada == "Ativo" then setElementData (getLocalPlayer (), "Modo","Ativo") toggleControl ("fogo", verdadeiro) toggleControl ("vehicle_secondary_fire", true) toggleControl ("vehicle_fire", true) toggleControl ("aim_weapon", true) AbrirPainel () end end end end end addEventHandler ("onClientClick", getRootElement (), onClick) função isCursorOnElement (x, y, largura, altura) local cx, cy = getCursorPosition () local cx, cy = (cx * sx), (cy * sy) if (cx> = x e cx <= x + largura) e (cy> = y e cy <= y + altura) então retorna verdadeiro, senão retorna falso fim fim addEventHandler ("onClientPlayerDamage", raiz, função (thePlayer) if getElementData (getLocalPlayer (), "Modo") == "Passivo" then triggerServerEvent ("chamarVida", getLocalPlayer ()) end end) addEventHandler ("onClientPlayerSpawn", localPlayer, function (thePlayer) if getElementData (getLocalPlayer (), " Modo ") ==" Passivo "then triggerServerEvent (" chamarVida ", getLocalPlayer ()) end end) function dxDrawEmptyRec (posX, posY, posW, posH, cor, escala) dxDrawLine (posX, posY, posX + posW, posY, cor, escala) dxDrawLine (posX, posY, posX, posY + posH, cor, escala) dxDrawLine (posX , posY + posH, posX + posW, posY + posH, cor, escala) dxDrawLine (posX + posW, posY, posX + posW, posY + posH, cor, escala) end function cursorPosition (x, y, w, h) if (not isCursorShowing ()) then return false end local mx, my = getCursorPosition () local fullx, fullx = guiGetScreenSize () cursorx, cursory = mx * fullx, my * fullx se cursorx> x e cursorx <x + we cursory> y e cursory <y + h então retorna true senão retorna false end end função colisão (vehpassivo) para índice, veículo em ipairs (getElementsByType ("veículo")) do setElementCollidableWith (vehpassivo, veículo, falso) setElementCollidableWith (veículo, vehpassivo, falso) end end addEvent ("BS: CarroPassivo", verdadeiro) addEventHandler ( "BS: CarroPassivo", getRootElement (), colision) ------------------------------------------------------------------------- server.lua função AbrirDx (recurso) triggerClientEvent (fonte, "BS: PainelAtivo", getRootElement ()) end addEventHandler ("onPlayerLogin", getRootElement (), AbrirDx) function TrocarModo (source) if getPedOccupiedVehicle (source) então se não getElementDimension (source) == 0 então retornar end se não getElementInterior (source) == 0 então retornar end removePedFromVehicle (fonte) end triggerClientEvent (fonte, "BS: PainelAtivo", getRootElement ()) end addCommandHandler ("trocarmodo", TrocarModo) function togglestaffMode () setPedArmor (source, 200) setElementHealth (source, 200) setPlayerWantedLevel (source, 0) end addEvent ("chamarVida", true) addEventHandler ("chamarVida", getRootElement (), togglestaffMode) função verpassivo () para i, jogador em pares (getElementsByType ("player")) faz if getElementData (player, "Modo") == "Passivo" then local theVehicle = getPedOccupiedVehicle (player) se theVehicle então setElementHealth (theVehicle, 1000) - setVehicleWheelStates (theVehicle, 3, 3, 3, 3) triggerClientEvent (player, "BS: CarroPassivo", getRootElement (), theVehicle) end end end end setTimer (verpassivo, 50, 0) -------------------------------------------------- ---------------------------------
  3. Eu tenho um script que spawna Skin por comando, basicamente quem estiver na acl e executar um comando ele recebe uma skin. Eu Queria Mudar, em vez de spawnar uma skin spawnar um carro quem poder me ajudar '-' function Gang1 ( player ) local accName = getAccountName ( getPlayerAccount (player) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "amora" ) ) then setElementModel(player, 56) setElementData(player, "56",56) outputChatBox("Você usou a skin da gangue Exemplo ", player, 0, 25, 0, false) end end addCommandHandler("skin",Gang1)
  4. Eu queria deixar esse nome tag com a funçao de quando o staff digitasse um comando o nome dele sumisse junto com a vida e o colete. alguem poderia me ajudar? words = {} SQLS3D = { qury = executeSQLQuery } chatTime = {} lastChatMessage = {} addEventHandler("onPlayerChat", getRootElement(), function(text, msgtype, thePlayer) local account = getAccountName(getPlayerAccount(source)) local name = getPlayerName(source) local root = getRootElement() local id = getElementData(source, "ID") or "N/A" local name = getPlayerName(source) local r,g,b = getPlayerNametagColor(source) local Account1 = getPlayerAccount ( source ) local new = "" local iter = 0 msg = string.gsub(text,"ـ","") for word in msg:gmatch("%S+") do iter = iter + 1 -- for i,swr in ipairs(words) do -- local src = word:lower():gsub("%s","") -- local src = src:gsub("#%x%x%x%x%x%x","") -- local src = src:gsub("%c","") -- local src = src:gsub("%p","") -- local pat = swr:lower():gsub("%s","") -- if src:find(pat) then -- local replaceString = "" -- for x=1,word:gsub("#%x%x%x%x%x%x",""):len() do -- replaceString = replaceString.."*" -- end -- word = word:gsub(word,replaceString) -- end -- end if iter == 1 and word:len() > 0 then word = word:gsub("%a",string.upper,1) end new = new..word.." " end if new ~= "" then msg = new end text = msg if chatTime[source] and chatTime[source] + tonumber(1000) > getTickCount() then cancelEvent() outputChatBox("Espere 1 segundo para poder digitar novamente!", source, 255, 0, 0) return else chatTime[source] = getTickCount() end lastChatMessage[source] = text local r, g, b = getPlayerNametagColor(source) cancelEvent() if isObjectInACLGroup("user." .. account, aclGetGroup("Console")) then cancelEvent(true) outputChatBox("#00ffff╠═⟦ #ffffffв#00ffff√#ffffffʟ#00ffff ⟧#2F2F2F ⌜ #00ff00Dona #ff0000Geral #2F2F2F⌟ #ffffff" .. name .. "#FFFFFF ("..id..") »#ffffff " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Subdono")) then cancelEvent(true) outputChatBox("#00ffff╠═⟦ #ffffffв#00ffff√#ffffffʟ#00ffff ⟧#2F2F2F ⌜ #00BFFFSub #ff0000Dono #2F2F2F⌟ #FFFFFF" .. name .."#FFFFFF ("..id..") »#FFFFFF " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Admin geral")) then cancelEvent(true) outputChatBox("#00ffff╠═⟦ #ffffffв#00ffff√#ffffffʟ#00ffff ⟧ #2F2F2F⌜ #00FFFFAdministrador #FFFAFAGeral #2F2F2F⌟ " .. name .."#FFFFFF ("..id..") »#FFFFFF " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then cancelEvent(true) outputChatBox("#00ffff╠═⟦ #ffffffв#00ffff√#ffffffʟ ⌟ #2F2F2F⌜ #FF0040Adminis#FFFFFFtrador #2F2F2F⌟ #FFFFFF" .. name .."#FFFFFF ("..id..") »#FFFFFF " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Moderador")) then cancelEvent(true) outputChatBox("#00ffff╠═⟦ #ffffffв#00ffff√#ffffffʟ#00ffff ⟧ #2F2F2F⌜ #9B30FFModer#FFFFFFador #2F2F2F⌟ #FFFFFF" .. name .."#FFFFFF ("..id..") »#FFFFFF " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("SuperModerator")) then cancelEvent(true) outputChatBox("#00ffff╠═⟦ #ffffffв#00ffff√#ffffffʟ#00ffff ⟧ #2F2F2F⌜ #00ff00Super#2F2F2F Moderador ⌟ #FFFFFF" .. name .."#FFFFFF ("..id..") »#FFFFFF " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Ajudante")) then cancelEvent(true) outputChatBox("#00ffff╠═⟦ #ffffffв#00ffff√#ffffffʟ#00ffff ⟧ #2F2F2F⌜ #7FFFD4Ajud#FFFFFFante #2F2F2F ⌟ #FFFFFF" .. name .."#FFFFFF ("..id..") »#FFFFFF " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("vip")) then cancelEvent(true) outputChatBox("#00ffff╠═⟦ #ffffffв#00ffff√#ffffffʟ#00ffff ⟧ #2F2F2F⌜ #FF00FFVIP #2F2F2F⌟ #FFFFFF" .. name .."#FFFFFF ("..id..") »#FFFFFF " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Versatil Drifting")) then cancelEvent(true) outputChatBox("#00ffff╠═⟦ #ffffffв#00ffff√#ffffffʟ#00ffff ⟧ #2F2F2F⌜ #2F2F2FVЄƦƧƛƬƖԼ #FF0040ƊƦƖƑƬƖƝƓ ⌟ #FFFFFF" .. name .."#FFFFFF ("..id..") »#FFFFFF " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("tagdovip")) then cancelEvent(true) outputChatBox("#00ffff╠═⟦ #ffffffв#00ffff√#ffffffʟ#00ffff ⟧ #2F2F2F⌜ #FFFFFFV҉I҉P#363636-™ #2F2F2F⌟ #FFFFFF" .. name .."#FFFFFF ("..id..") »#FFFFFF " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("tdetag")) then cancelEvent(true) outputChatBox("#00ffff╠═⟦ #ffffffв#00ffff√#ffffffʟ#00ffff ⟧#2F2F2F⌜ #00BFFF✘ ŦŘØƤΔ ĐΔ €ŞĆØĆƗΔ ✘ #2F2F2F⌟ #FFFFFF" .. name .."#FFFFFF ("..id..") »#FFFFFF " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("cvtag")) then cancelEvent(true) outputChatBox("#00ffff╠═⟦ #ffffffв#00ffff√#ffffffʟ#00ffff ⟧#2F2F2F⌜ #ff0000✞ ĆØΜΔŇĐØ V€ŘΜ€ŁĦØ ✞ #2F2F2F⌟ #FFFFFF" .. name .."#FFFFFF ("..id..") »#FFFFFF " .. text, root, 255, 255, 255, true) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then cancelEvent(true) outputChatBox("#00ffff╠═⟦ #ffffffв#00ffff√#ffffffʟ#00ffff ⟧ #2F2F2F⌜ #00BFFFJoga#FFFFFFdor #2F2F2F⌟ #FFFFFF" .. name .."#FFFFFF ("..id..") »#FFFFFF" .. text, root, 255, 255, 255, true) outputServerLog("CHAT: " .. name .. ": " .. text) end end )
×
×
  • Create New...