Jump to content

V1RU5

Members
  • Posts

    19
  • Joined

  • Last visited

Recent Profile Visitors

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

V1RU5's Achievements

Square

Square (6/54)

0

Reputation

  1. Manda o código do client.lua para eu verificar
  2. Se for uma algo especifico você pode baixar o DB Brower for Sqlite e editar o registry.db na pasta do seu servidor.
  3. Client side: anim_tick = getTickCount() addEventHandler("onClientResourceStart", resourceRoot, function() for k,v in pairs(getElementsByType("marker", _, true)) do if getElementData(v, "marker:custom") and getElementData(v, "marker:cicletype") then getMarkerCustom() end end end ) function getMarkerCustom() local progress = ((getTickCount() - anim_tick) / 3000) local Op1, Op2 = interpolateBetween(0.4, 1.4, 0, 0.7, 1.7, 0, progress, "SineCurve") local Op3, Op4, Op5 = interpolateBetween(0.8, 0.8, 1.6, 1.0, 1.0, 2.1, progress, "SineCurve") local px, py, pz, l1, l2, l3 local px, py, pz = getCameraMatrix() for _, marker in ipairs(getElementsByType 'marker') do if getElementData(marker, "marker:custom") and getElementData(marker, "marker:cicletype") then setMarkerColor(marker, 0, 0, 0, 0) local l1, l2, l3 = getElementPosition(marker) local dist = math.sqrt((px + l1) ^ 0 + (py + l2) ^ 0 + (pz + l3) ^ 0) local r, g, b = getMarkerColor(marker) if dist < 20 then if isLineOfSightClear(px, py, pz, l1, l2, l3, false, false, false, true, false, false, false, localPlayer) then local x,y = getScreenFromWorldPosition(l1, l2, l3) if x then for k, v in pairs(ImgType) do if getElementData(marker, "marker:custom") == k then dxDrawMaterialLine3D (l1, l2, l3 + Op1 + 0.4, l1, l2, l3 + Op2 + 0.4, dxCreateTexture(""..v[1]..""), 1, tocolor(v[2], v[3], v[4], 255)) end end for k, v in pairs(CicleType) do if getElementData(marker, "marker:cicletype") == k then dxDrawMaterialLine3D (l1, l2 - Op3 + 0.3, l3 + 0.03, l1, l2 + Op4 - 0.3, l3 + 0.03, dxCreateTexture(""..v[1]..""), Op5 - 0.7, tocolor(v[2], v[3], v[4], 255), 0, 0, -1730900) end end end end end end end end addEventHandler("onClientRender", root, getMarkerCustom) Shared side: ImgType = { -- ID, Imagem Logo, R, G, B [1] = {"assets/tipos/1.png", 255, 255, 255}, -- CETA [2] = {"assets/tipos/2.png", 255, 255, 255}, -- MALETA [3] = {"assets/tipos/3.png", 255, 255, 255}, -- ANONYMOUS [4] = {"assets/tipos/4.png", 255, 255, 255}, -- CHOQUE [5] = {"assets/tipos/5.png", 255, 255, 255}, -- GOE [6] = {"assets/tipos/6.png", 255, 255, 255}, -- CONCESSONARIA [7] = {"assets/tipos/7.png", 255, 255, 255}, -- DETRAN [8] = {"assets/tipos/8.png", 255, 255, 255}, -- MECANICO [9] = {"assets/tipos/9.png", 255, 255, 255}, -- POLICIA CIVIL [10] = {"assets/tipos/10.png", 255, 255, 255}, -- POLICIA FEDERAL [11] = {"assets/tipos/11.png", 255, 255, 255}, -- POLICIA MILITAR [12] = {"assets/tipos/12.png", 255, 255, 255}, -- POLICIA RODOVIARIA FEDERAL [13] = {"assets/tipos/13.png", 255, 255, 255}, -- SAMU [14] = {"assets/tipos/8.png", 255, 20, 147}, -- MECANICO COR ROSA } CicleType = { -- ID, Imagem Circulo, R, G, B [1] = {"assets/circulos/1.png", 255, 255, 255}, -- CICULO PADRÂO BRANCO [2] = {"assets/circulos/1.png", 255, 20, 147}, -- CICULO PADRÂO ROSA [3] = {"assets/circulos/1.png", 58, 95, 205}, -- CICULO PADRÂO AZUL ROYAL } Server side concessonaria1 = createMarker (1778.1500000000,-1772.000000000,12.70305099487, "cylinder", 1.5, 255, 255, 255, 0 ) setElementData(concessonaria1, "marker:custom", 6) -- MARKER ID IMAGEM ( TIPO 6 = CONCESSONARIA) setElementData(concessonaria1, "marker:cicletype", 3) -- MARKER ID CIRCULO ( TIPO 3 = CICULO PADRAO AZUL) Debugscript: Acredito que o problema é no for, mas não sei como resolver... ?
  4. Olá, estou fazendo um mod que quando você entra em contato com um marker é mudado a dimensão e interior e abre um menu. Quando eu fecho o menu era para mudar a dimensão e interior para 0, más ele muda apenas parcialmente. no painel admin aparece que estou na dimensão e interior 0 só que não consigo interagir com mais nada no servidor. obs: se eu abro o mod do freeroam e mudar o interior para outside ele volta ao normal. obs2: se eu relogo ele vai para dimesão 201 e interior 4 --server side addEventHandler("onMarkerHit",anmarkershop, function(hitElement) if (getElementType(hitElement) == "player") then if not isPedInVehicle(hitElement) then setElementInterior(hitElement,4) setElementDimension(hitElement,201) setCameraMatrix(hitElement,301.53118896484, -78.985656738281, 1003.0477905273, 394.61657714844, -81.277969360352, 966.58056640625) triggerClientEvent(hitElement,"ADANshopshow",hitElement) else triggerClientEvent(hitElement,"ADaddPlayerMSG",hitElement,"Você deve sair do veiculo!") end end end) --client side function anwexitshop() guiSetVisible(anbg,false) showChat(true) setCameraTarget(localPlayer) showPlayerHudComponent("all",true) showCursor(false) setElementInterior(localPlayer,0) setElementDimension(localPlayer,0) setElementPosition(localPlayer,782.55,-2136.05,36.46) end terceira foto quando eu entro em um carro ele fica invisivel
  5. @Santi Funcionou, obrigadão!!
  6. Quando eu inicio o mod "[-=Fuel=-]" junto com o servidor ou seja configurado na mtaserver.conf, fica flodando esse erro no console " [-=BVC=-]\[-=Script=-]\[-=Fuel=-]\server\main.Lua:16: attempt to compare string with number " factor = 0.03 function createVehicles(player) for i,v in ipairs(getElementsByType("vehicle")) do fuel = math.random(70,80) setElementData(v, "fuel", fuel) end end function processFuel(player) for i,v in ipairs(getElementsByType("vehicle")) do local fuel = getElementData(v, "fuel") or math.random(70,80) if (getVehicleEngineState(v) and fuel > 0 ) then fuel = fuel - factor end if (fuel <= 0.99) then fuel = 0 setVehicleEngineState(v, false) end setElementData(v, "fuel", fuel) end end createVehicles() setTimer(processFuel, 1000, 0) OBS: Só da esse bug se o mod for iniciado com o servidor, se for iniciado com o painel admin. obg pela atenção!!
  7. quando estou logando o inventario abre enquanto eu estou digitando minha senha, estão queria colocar para que o painel inventario abri-se somente se o player estiver online. mas eu não consegui. script de abrir o painel: function FecharAbrirPainel () if painel == false then addEventHandler ( "onClientRender", root, PainelInventario ) painel = true showCursor ( true ) playSoundFrontEnd ( 43 ) setElementData(localPlayer, "TS:Aba", "Inicial") else removeEventHandler ( "onClientRender", root, PainelInventario ) playSoundFrontEnd ( 43 ) painel = false showCursor ( false ) Lista_Drogas:SetVisible(false) end end bindKey ("I" , "down" , FecharAbrirPainel)
  8. local stat = dxGetStatus() local bit = nil function vgaDraw() if not getElementData(localPlayer,"loggedin") then return end if not getElementData(localPlayer,"togHUD") then return end if not interface:getNode(10,"showing") then return end if stat["Setting32BitColor"] then bit = 32 else bit = 16 end dxDrawText(stat["VideoCardName"].."\nVRAM:"..stat["VideoMemoryFreeForMTA"].."/"..stat["VideoCardRAM"].."MB, FONT:"..stat["VideoMemoryUsedByFonts"].."MB,\nTEXTURE:"..stat["VideoMemoryUsedByTextures"].."MB, RTARGET:"..stat["VideoMemoryUsedByRenderTargets"].."MB,\nRATIO:"..stat["SettingAspectRatio"]..", SIZE:"..Screen[1].."x"..Screen[2].."x"..bit,interface:getNode(10, "x")-1,interface:getNode(10, "y"),sx,sy,tocolor(0,0,0,255),0.9,myriad,"left",nil,nil,nil,nil,true) dxDrawText(stat["VideoCardName"].."\nVRAM:"..stat["VideoMemoryFreeForMTA"].."/"..stat["VideoCardRAM"].."MB, FONT:"..stat["VideoMemoryUsedByFonts"].."MB,\nTEXTURE:"..stat["VideoMemoryUsedByTextures"].."MB, RTARGET:"..stat["VideoMemoryUsedByRenderTargets"].."MB,\nRATIO:"..stat["SettingAspectRatio"]..", SIZE:"..Screen[1].."x"..Screen[2].."x"..bit,interface:getNode(10, "x"),interface:getNode(10, "y")-1,sx,sy,tocolor(0,0,0,255),0.9,myriad,"left",nil,nil,nil,nil,true) dxDrawText(stat["VideoCardName"].."\nVRAM:"..stat["VideoMemoryFreeForMTA"].."/"..stat["VideoCardRAM"].."MB, FONT:"..stat["VideoMemoryUsedByFonts"].."MB,\nTEXTURE:"..stat["VideoMemoryUsedByTextures"].."MB, RTARGET:"..stat["VideoMemoryUsedByRenderTargets"].."MB,\nRATIO:"..stat["SettingAspectRatio"]..", SIZE:"..Screen[1].."x"..Screen[2].."x"..bit,interface:getNode(10, "x"),interface:getNode(10, "y")+1,sx,sy,tocolor(0,0,0,255),0.9,myriad,"left",nil,nil,nil,nil,true) dxDrawText(stat["VideoCardName"].."\nVRAM:"..stat["VideoMemoryFreeForMTA"].."/"..stat["VideoCardRAM"].."MB, FONT:"..stat["VideoMemoryUsedByFonts"].."MB,\nTEXTURE:"..stat["VideoMemoryUsedByTextures"].."MB, RTARGET:"..stat["VideoMemoryUsedByRenderTargets"].."MB,\nRATIO:"..stat["SettingAspectRatio"]..", SIZE:"..Screen[1].."x"..Screen[2].."x"..bit,interface:getNode(10, "x")+1,interface:getNode(10, "y"),sx,sy,tocolor(0,0,0,255),0.9,myriad,"left",nil,nil,nil,nil,true) dxDrawText("#7cc576"..stat["VideoCardName"].."\n#FFFFFFVRAM:"..stat["VideoMemoryFreeForMTA"].."/"..stat["VideoCardRAM"].."MB, FONT:"..stat["VideoMemoryUsedByFonts"].."MB,\nTEXTURE:"..stat["VideoMemoryUsedByTextures"].."MB, RTARGET:"..stat["VideoMemoryUsedByRenderTargets"].."MB,\nRATIO:"..stat["SettingAspectRatio"]..", SIZE:"..Screen[1].."x"..Screen[2].."x"..bit,interface:getNode(10, "x"),interface:getNode(10, "y"),sx,sy,tocolor(255,255,255,255),0.9,myriad,"left",nil,nil,nil,nil,true) end Eu peguei um mod na gringa, e em uma parte do script achei esse código que me pareceu estranho, queria saber se ele é de alguma forma malicioso.
  9. estou fazendo um script de trabalho mas o valor desta função esta dando nil, fiquei horas revisando o script e n achei o erro. function fecharpainel (_,state) if painel == true then if state == "down" then if ( isCursorOnElement (947, 191, 22, 24)) then removeEventHandler("onClientRender", root, paineldx) showCursor (false) painel = false end end end end addEventHandler ("onClientClick", root, fecharpainel) no debug está aparecendo isso " attempt to call global 'isCursoOnElement' (a nil value) se alguém poder me ajudar agradeço.
  10. local sx,sy = guiGetScreenSize() function speed(thePlayer, seat, jacke) local veh = getPedOccupiedVehicle(localPlayer) local fuel = math.floor(getElementData(veh,"fuel") or 100) local hpcar = math.floor(getElementHealth(veh) /10) local getspeed = math.floor(getElementSpeed(veh,"km/h")) if not veh then return end dxDrawImage(sx-310,sy-193,307,177,"files/fon_speed.png") dxDrawImage(sx-235,sy-90,26,26,"files/light_r_off.png") dxDrawImage(sx-300,sy-90,26,26,"files/light_l_off.png") if(getElementData(veh,"rightflash")) then if (getTickCount() % 1400 >= 600) then dxDrawImage(sx-235,sy-90,26,26,"files/light_r_on.png") end end if(getElementData(veh,"leftflash")) then if (getTickCount() % 1400 >= 600) then dxDrawImage(sx-300,sy-90,26,26,"files/light_l_on.png") end end if(getElementData(veh, "allflash")) then if(getTickCount() % 1400 >= 600) then dxDrawImage(sx-235,sy-90,26,26,"files/light_r_on.png") dxDrawImage(sx-300,sy-90,26,26,"files/light_l_on.png") end end if(getVehicleEngineState(veh) == true) then dxDrawImage(sx-125,sy-49,26,26,"files/engine_on.png") elseif(getVehicleEngineState(veh) == false) then dxDrawImage(sx-125,sy-49,26,26,"files/engine_off.png") end if(getVehicleOverrideLights(veh) == 2) then dxDrawImage(sx-180,sy-49,26,26,"files/lights_on.png") else dxDrawImage(sx-180,sy-49,26,26,"files/lights_off.png") end if(isVehicleLocked(veh) == true) then dxDrawImage(sx-70,sy-49,26,26,"files/door_close.png") elseif(isVehicleLocked(veh) == false) then dxDrawImage(sx-70,sy-49,26,26,"files/door_open.png") end if(getspeed >= 100) then dxDrawText(string.format("%s",getspeed),sx-283,sy-145,sx-315,70,tocolor(255,255,255,255),2.5,"default-bold") elseif(getspeed >= 10) then dxDrawText(string.format("%s",getspeed),sx-273,sy-145,sx-315,70,tocolor(255,255,255,255),2.5,"default-bold") elseif(getspeed <= 9) then dxDrawText(string.format("%s",getspeed),sx-265,sy-145,sx-315,70,tocolor(255,255,255,255),2.5,"default-bold") end if(fuel >= 100) then dxDrawRectangle(sx-167,sy-146,fuel*1.4,3,tocolor(225, 150, 48, 255)) dxDrawText(string.format("%s",fuel),sx-75,sy-173,15,15,tocolor(255,255,255,255),1.8) elseif(fuel <= 15) then dxDrawRectangle(sx-167,sy-146,fuel*1.4,3,tocolor(213, 38, 38, 255)) dxDrawText(string.format("%s",fuel),sx-60,sy-173,15,15,tocolor(255,255,255,255),1.8) elseif(fuel <= 25) then dxDrawRectangle(sx-167,sy-146,fuel*1.4,3,tocolor(218,207, 96, 255)) dxDrawText(string.format("%s",fuel),sx-60,sy-173,15,15,tocolor(255,255,255,255),1.8) elseif(fuel <= 9) then dxDrawRectangle(sx-167,sy-146,fuel*1.4,3,tocolor(213, 38, 38, 255)) dxDrawText(string.format("%s",fuel),sx-50,sy-173,15,15,tocolor(255,255,255,255),1.8) elseif(fuel >= 10) then dxDrawRectangle(sx-167,sy-146,fuel*1.4,3,tocolor(225, 150, 48, 255)) dxDrawText(string.format("%s",fuel),sx-60,sy-173,15,15,tocolor(255,255,255,255),1.8) end if(hpcar >= 100) then dxDrawRectangle(sx-167,sy-87,hpcar*1.4,3,tocolor(210, 255, 0, 255)) dxDrawText(string.format("%s",hpcar),sx-80,sy-114,15,15,tocolor(255,255,255,255),1.8) elseif(hpcar <= 50) then dxDrawRectangle(sx-167,sy-87,hpcar*1.4,3,tocolor(213, 38, 38, 255)) dxDrawText(string.format("%s",hpcar),sx-70,sy-114,15,15,tocolor(255,255,255,255),1.8) elseif(hpcar <= 65) then dxDrawRectangle(sx-167,sy-87,hpcar*1.4,3,tocolor(218,207, 96, 255)) dxDrawText(string.format("%s",hpcar),sx-70,sy-114,15,15,tocolor(255,255,255,255),1.8) elseif(hpcar <= 9) then dxDrawRectangle(sx-167,sy-87,hpcar*1.4,3,tocolor(213, 38, 38, 255)) dxDrawText(string.format("%s",hpcar),sx-60,sy-114,15,15,tocolor(255,255,255,255),1.8) elseif(hpcar >= 10) then dxDrawRectangle(sx-167,sy-87,hpcar*1.4,3,tocolor(210, 255, 0, 255)) dxDrawText(string.format("%s",hpcar),sx-70,sy-114,15,15,tocolor(255,255,255,255),1.8) end end addEventHandler ( "onVehicleEnter", getRootElement(), speed )
  11. local sx,sy = guiGetScreenSize() function speed(thePlayer, seat, jacke) local veh = getPedOccupiedVehicle(localPlayer) local fuel = math.floor(getElementData(veh,"fuel") or 100) local hpcar = math.floor(getElementHealth(veh) /10) local getspeed = math.floor(getElementSpeed(veh,"km/h")) if not veh then return end dxDrawImage(sx-310,sy-193,307,177,"files/fon_speed.png") dxDrawImage(sx-235,sy-90,26,26,"files/light_r_off.png") dxDrawImage(sx-300,sy-90,26,26,"files/light_l_off.png") if(getElementData(veh,"rightflash")) then if (getTickCount() % 1400 >= 600) then dxDrawImage(sx-235,sy-90,26,26,"files/light_r_on.png") end end if(getElementData(veh,"leftflash")) then if (getTickCount() % 1400 >= 600) then dxDrawImage(sx-300,sy-90,26,26,"files/light_l_on.png") end end if(getElementData(veh, "allflash")) then if(getTickCount() % 1400 >= 600) then dxDrawImage(sx-235,sy-90,26,26,"files/light_r_on.png") dxDrawImage(sx-300,sy-90,26,26,"files/light_l_on.png") end end if(getVehicleEngineState(veh) == true) then dxDrawImage(sx-125,sy-49,26,26,"files/engine_on.png") elseif(getVehicleEngineState(veh) == false) then dxDrawImage(sx-125,sy-49,26,26,"files/engine_off.png") end if(getVehicleOverrideLights(veh) == 2) then dxDrawImage(sx-180,sy-49,26,26,"files/lights_on.png") else dxDrawImage(sx-180,sy-49,26,26,"files/lights_off.png") end if(isVehicleLocked(veh) == true) then dxDrawImage(sx-70,sy-49,26,26,"files/door_close.png") elseif(isVehicleLocked(veh) == false) then dxDrawImage(sx-70,sy-49,26,26,"files/door_open.png") end if(getspeed >= 100) then dxDrawText(string.format("%s",getspeed),sx-283,sy-145,sx-315,70,tocolor(255,255,255,255),2.5,"default-bold") elseif(getspeed >= 10) then dxDrawText(string.format("%s",getspeed),sx-273,sy-145,sx-315,70,tocolor(255,255,255,255),2.5,"default-bold") elseif(getspeed <= 9) then dxDrawText(string.format("%s",getspeed),sx-265,sy-145,sx-315,70,tocolor(255,255,255,255),2.5,"default-bold") end if(fuel >= 100) then dxDrawRectangle(sx-167,sy-146,fuel*1.4,3,tocolor(225, 150, 48, 255)) dxDrawText(string.format("%s",fuel),sx-75,sy-173,15,15,tocolor(255,255,255,255),1.8) elseif(fuel <= 15) then dxDrawRectangle(sx-167,sy-146,fuel*1.4,3,tocolor(213, 38, 38, 255)) dxDrawText(string.format("%s",fuel),sx-60,sy-173,15,15,tocolor(255,255,255,255),1.8) elseif(fuel <= 25) then dxDrawRectangle(sx-167,sy-146,fuel*1.4,3,tocolor(218,207, 96, 255)) dxDrawText(string.format("%s",fuel),sx-60,sy-173,15,15,tocolor(255,255,255,255),1.8) elseif(fuel <= 9) then dxDrawRectangle(sx-167,sy-146,fuel*1.4,3,tocolor(213, 38, 38, 255)) dxDrawText(string.format("%s",fuel),sx-50,sy-173,15,15,tocolor(255,255,255,255),1.8) elseif(fuel >= 10) then dxDrawRectangle(sx-167,sy-146,fuel*1.4,3,tocolor(225, 150, 48, 255)) dxDrawText(string.format("%s",fuel),sx-60,sy-173,15,15,tocolor(255,255,255,255),1.8) end if(hpcar >= 100) then dxDrawRectangle(sx-167,sy-87,hpcar*1.4,3,tocolor(210, 255, 0, 255)) dxDrawText(string.format("%s",hpcar),sx-80,sy-114,15,15,tocolor(255,255,255,255),1.8) elseif(hpcar <= 50) then dxDrawRectangle(sx-167,sy-87,hpcar*1.4,3,tocolor(213, 38, 38, 255)) dxDrawText(string.format("%s",hpcar),sx-70,sy-114,15,15,tocolor(255,255,255,255),1.8) elseif(hpcar <= 65) then dxDrawRectangle(sx-167,sy-87,hpcar*1.4,3,tocolor(218,207, 96, 255)) dxDrawText(string.format("%s",hpcar),sx-70,sy-114,15,15,tocolor(255,255,255,255),1.8) elseif(hpcar <= 9) then dxDrawRectangle(sx-167,sy-87,hpcar*1.4,3,tocolor(213, 38, 38, 255)) dxDrawText(string.format("%s",hpcar),sx-60,sy-114,15,15,tocolor(255,255,255,255),1.8) elseif(hpcar >= 10) then dxDrawRectangle(sx-167,sy-87,hpcar*1.4,3,tocolor(210, 255, 0, 255)) dxDrawText(string.format("%s",hpcar),sx-70,sy-114,15,15,tocolor(255,255,255,255),1.8) end end addEventHandler ( "onVehicleEnter", getRootElement(), speed ) é um velocímetro, quando o player entrar no carro é para a função funcionar mais ela n está ligando
  12. tem como fazer com que só consiga entrar em um carro se tiver com uma certa skin?
  13. aonde eu coloco o nome da acl ??? foi mau sou leigo mesmo. @DNL291
×
×
  • Create New...