-
Posts
1,990 -
Joined
-
Last visited
-
Days Won
2
Everything posted by #RooTs
-
use: https://www.myfonts.com/WhatTheFont/ cut out the piece of the image and send it to the site. is the best way
-
LOL, omg. please, give-me image screen shot with the erro. there is nothing wrong with the codes, the radar of Rage that's right. must be some problem with your gta mod --[[ -------------------------------------- # Resource Name Grand Theft Auto V | Radar # Author Rage Special Thanks to MrTasty(dxMap & Blips) # Date created 25.04.2014 # Last update 01.01.2015 # Updates [01.01.2015] -Moved from shader to dx -Blips support -------------------------------------- --]] local screenW,screenH = guiGetScreenSize() local resW,resH = 1280,720 local sW,sH = (screenW/resW), (screenH/resH) --Features local alwaysRenderMap = false local alwaysRenderOxygen = false local disableGTASAhealth = true local disableGTASAarmor = true local disableGTASAoxygen = true local enableBlipDistance = true --Dimensions & Sizes --Blip size, pixels relative to 1366x768 resolution local worldW, worldH = 3072, 3072 local blip = 14 local turn = true local alpha = 255 local sRotating = 0 local rt = dxCreateRenderTarget(290, 175) -- Useful functions -- function findRotation(x1,y1,x2,y2) --Author: Doomed_Space_Marine & robhol local t = -math.deg(math.atan2(x2-x1,y2-y1)) if t < 0 then t = t + 360 end; return t; end function getPointFromDistanceRotation(x, y, dist, angle) --Author: robhol local a = math.rad(90 - angle); local dx = math.cos(a) * dist; local dy = math.sin(a) * dist; return x+dx, y+dy; end function drawRadar() showPlayerHudComponent("radar", false) if disableGTASAhealth then showPlayerHudComponent("health", false) end if disableGTASAarmor then showPlayerHudComponent("armour", false) end if disableGTASAoxygen then showPlayerHudComponent("breath", false) end if (not isPlayerMapVisible()) then local mW, mH = dxGetMaterialSize(rt) if ( alwaysRenderMap or getElementInterior(localPlayer) == 0 ) then dxSetRenderTarget(rt, true) local x, y = getElementPosition(localPlayer) local X, Y = mW/2 -(x/(6000/worldW)), mH/2 +(y/(6000/worldH)) local camX,camY,camZ = getElementRotation(getCamera()) --dxDrawRectangle(0, 0, mW, mH, 0xFF7CA7D1) --render background dxDrawImage(X - worldW/2, mH/5 + (Y - worldH/2), worldW, worldH, "img/radar_map.jpg", camZ, (x/(6000/worldW)), -(y/(6000/worldH)), tocolor(255, 255, 255, 255)) dxSetRenderTarget() end --dxDrawImage((20+5)*sW, screenH-((191+5))*sH, (292-10)*sW, (144)*sH, rt, 0, 0, 0, tocolor(255, 255, 255, 150)) dxDrawImage((18+5)*sW, screenH-((179+5))*sH, (275-10)*sW, (135)*sH, rt, 0, 0, 0, tocolor(255, 255, 255, 150)) local health = math.max(math.min(getElementHealth(localPlayer)/(0.232018558500192*getPedStat(localPlayer, 24) -32.018558511152), 1), 0) local armor = math.max(math.min(getPedArmor(localPlayer)/100, 1), 0) local oxygen = math.max(math.min(getPedOxygenLevel(localPlayer)/(1.5*getPedStat(localPlayer, 225) +1000), 1), 0) --# Get rotations local _, _, c_Rot = getElementRotation( getCamera()); local _, _, p_Rot = getElementRotation( localPlayer ) local playerHealth = math.floor( getElementHealth( localPlayer )) local playerArmor = math.floor( getPedArmor( localPlayer )) local playerOxygen = math.floor( getPedOxygenLevel( localPlayer )) if ( playerHealth <= 50) then HP_Colour = tocolor(200, 0, 0, 190) HP_Alpha = tocolor(200, 0, 0, 100) else HP_Colour = tocolor(102, 204, 102, 190) HP_Alpha = tocolor(102, 204, 102, 100) end if ( playerHealth >= 101 ) then maxHealth = 200 else maxHealth = 100 end --# Alpha dxDrawRectangle(23.5*sW, 676.5*sH, 130.5*sW, 9.2*sH, HP_Alpha) dxDrawRectangle(156.6*sW, 676.5*sH, 65*sW, 9.2*sH, tocolor(0, 102, 255, 100)) dxDrawRectangle(225*sW, 676.5*sH, 62.6*sW, 9.2*sH, tocolor(255, 255, 0, 100)) --# Bars dxDrawRectangle(23.5*sW, 676.5*sH, 130.5*sW/maxHealth*playerHealth, 9.2*sH, HP_Colour) dxDrawRectangle(156.6*sW, 676.5*sH, 65*sW/100*playerArmor, 9.2*sH, tocolor(0, 102, 255, 190)) dxDrawRectangle(225*sW, 676.5*sH, 62.6*sW/1000*playerOxygen, 9.2*sH, tocolor(255, 255, 0, 190)) --# Radar Cover dxDrawImage(18*sW, 530*sH, 275*sW, 160*sH, "img/radar_cover.png", 0, 0, 0, tocolor(255, 255, 255, 255)) --#Blips local rx, ry, rz = getElementRotation(localPlayer) local lB = (23)*sW local rB = (23+265)*sW local tB = screenH-(184)*sH local bB = tB + (135)*sH local cX, cY = (rB+lB)/2, (tB+bB)/2 +(35)*sH for k, v in ipairs(getElementsByType("blip")) do local px, py, pz = getElementPosition(localPlayer) local _,_,camZ = getElementRotation(getCamera()) local bx, by, bz = getElementPosition(v) local actualDist = getDistanceBetweenPoints2D(px, py, bx, by) local maxDist = getBlipVisibleDistance(v) if ( actualDist <= maxDist ) then local dist = actualDist/(6000/((worldW+worldH)/2)) local rot = findRotation(bx, by, px, py)-camZ local bpx, bpy = getPointFromDistanceRotation(cX, cY, dist, rot) local bpx = math.max(lB, math.min(rB, bpx)) local bpy = math.max(tB, math.min(bB, bpy)) local blipID = getElementData(v, "customIcon") or getBlipIcon(v) local _, _, _, bcA = getBlipColor(v) local bcR, bcG, bcB = 255, 255, 255 if getBlipIcon(v) == 0 then bcR, bcG, bcB = getBlipColor(v) end local bUD = "img/blip.png" if (bz - pz) >= 5 then bUD = "img/blip_up.png" elseif (bz - pz) <= -5 then bUD = "img/blip_down.png" end local bS = getBlipSize(v) dxDrawImage(bpx -(blip*bS)*sW/2, bpy -(blip*bS)*sH/2, (blip*bS)*sW, (blip*bS)*sH, "img/blips/"..blipID..".png", 0, 0, 0, tocolor(bcR, bcG, bcB, bcA)) end end if ( renderNorthBlip ) then local _,_,camZ = getElementRotation(getCamera()) local toLeft, toTop, toRight, toBottom = cX-lB, cY-tB, rB-cX, b-cY local bpx, bpy = getPointFromDistanceRotation(cX, cY, math.sqrt(toTop^2 + toLeft^2), -camZ+180) local bpx = math.max(lB, math.min(rB, bpx)) local bpy = math.max(tB, math.min(bB, bpy)) dxDrawImage(bpx -(blip*2)/2, bpy -(blip*2)/2, blip*2, blip*2, "img/blips/4.png", 0, 0, 0) end local _,_,camZ = getElementRotation(getCamera()) dxDrawImage(cX -(blip*1.5)*sW/2, cY -(blip*1.5)*sH/2, (blip*1.5)*sW, (blip*1.5)*sH, "img/player.png", camZ-rz, 0, 0) --[[ sRotating=sRotating+10 if ( sRotating==360 ) then sRotating=0 end]] --[[ local localVehicle = getPedOccupiedVehicle(localPlayer) if isElement(localVehicle) and getVehicleType(localVehicle) == "Helicopter" then dxDrawImage(cX -(blip*1.5)*sW/2, cY -(blip*2)*sH/2, (blip*2)*sW, (blip*2)*sH, "img/hunter.png", camZ-rz, 0, 0) dxDrawImage(cX -(blip*1.5)*sW/2, cY -(blip*2)*sH/2, (blip*2)*sW, (blip*2)*sH, "img/hrotor.png", sRotating) elseif isElement(localVehicle) and getVehicleType(localVehicle) == "Plane" then dxDrawImage(cX -(blip*1.5)*sW/2, cY -(blip*2)*sH/2, (blip*2)*sW, (blip*2)*sH, "img/blips/5.png", camZ-rz, 0, 0) else dxDrawImage(cX -(blip*1.5)*sW/2, cY -(blip*1.5)*sH/2, (blip*1.5)*sW, (blip*1.5)*sH, "img/player.png", camZ-rz, 0, 0) end ]] --# Wanted local g_wl = getPlayerWantedLevel( localPlayer ) if ( g_wl > 0 ) then if ( turn == true ) then alpha = alpha + 5 if ( alpha > 180 ) then alpha = 180 turn = false end elseif ( turn == false ) then alpha = alpha - 5 if ( alpha < 0 ) then alpha = 0 turn = true end end dxDrawRectangle(23*sW, 536*sH, 265*sW, 135*sH, tocolor(0, 102, 255, alpha)) else return end end end addEventHandler( "onClientRender", root, drawRadar) local hudTable = { "ammo", "armour", "clock", "health", "money", "weapon", "wanted", "area_name", "vehicle_name", "breath", "clock" } addEventHandler("onClientResourceStart", resourceRoot, function() for id, hudComponents in ipairs(hudTable) do showPlayerHudComponent(hudComponents, false) end end) addEventHandler("onClientResourceStop", resourceRoot, function() for id, hudComponents in ipairs(hudTable) do showPlayerHudComponent(hudComponents, true) end end)
-
está me parecendo com o Xeon, mais de qualquer maneira todos nós sabemos que testar é a melhor maneira de ver algum bug ou erro, se nem você estava dando conta de ajudar o ~#Pedro, agora vem aqui tentar me corrigir ? kkk não falo mais nada Porfavor não saia do assunto do Tópico
-
depois eu testo, e vejo se não há nessecidade de uma Variável, apenas passei de time para tempo
-
WTF ? I tested here and work, what's your game mode
-
Adicionado! (não testado)
-
Obrigado por lembrar, confundi as pastas Paraquedas Planador ID: 3131 Mochila ID: 371
-
Parachute ID: 371 a Id do planador você pode encontrar dentro do script Parachute, que está localizado dentro do [play]
-
Bom... me desculpa se estou sendo grosso. Mais, apenas testei o seu código em meu servidor local e tirei uns erros de sintaxe e encode UTF-8 coisa que você deveria fazer, e não fez, e se ele quiser retirar o Output ai já é com ele e não comigo. para não sair do assundo que você adora fazer isso, retorno a falar novamente
-
Indicação MTA:SA Contribuidor
#RooTs replied to SpoC^'s topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor)
Nossa, fiquei emocionado fico muito feliz em saber que tem várias pessoas comentando a favor, Obrigado Iaan. e com o tempo tenho certeza que você Iaan, será indicado como Moderador nesta Área ( Other Languages Moderators ) Assim como o DNL291 entre outros.. -
I tested all files and worked perfect
-
the user had already noted in the description, then he took Delete https://community.multitheftauto.com/ind ... s&id=11271 DONE
-
Server local marker = {} local markers = { {["markerPos"] = {2505.5,-1690,13.6},["price"] = {30000}, ["teleportPos"] = {2496.699,-1667.9,7566.5}}, {["markerPos"] = {2493.3,-1667.59,7566.5},["price"] = {30000}, ["teleportPos"] = {2504.8,-1685.69,13.5}} } function onResourceStart() for k=1, #markers do marker[k] = createMarker(markers[k]["markerPos"][1], markers[k]["markerPos"][2], markers[k]["markerPos"][3], "cylinder", 2, 255, 0, 0, 255) setElementData(marker[k], "owner", false) setElementData(marker[k], "price", markers[k]["price"][1]) setElementData(marker[k], "teleportPos", {markers[k]["teleportPos"][1],markers[k]["teleportPos"][2],markers[k]["teleportPos"][3]}) end end addEventHandler("onResourceStart",resourceRoot, onResourceStart) function onPlayerMarkerHit(marker_,matchingDimension) if (matchingDimension) and not isGuestAccount(getPlayerAccount(source)) then outputChatBox("a") for k, v in ipairs(marker) do if marker_ == v then if getElementData(marker_,"owner") ~= getAccountName(getPlayerAccount(source)) then outputChatBox("Você Precisa Comprar essa garagem para entrar nela!",source, 255, 0, 0) if getPlayerMoney(source) < getElementData(marker_,"price") then return outputChatBox("Você não possui dinheiro o suficiente! ($"..getElementData(marker_,"price")..")",source, 255, 0, 0 ) end triggerClientEvent(source,"onPlayerRequestGUI",source,marker_) return end local element = getPedOccupiedVehicle(source) or source local x, y, z = unpack(getElementData(marker_,"teleportPos")) setElementPosition(element,x,y,z) setElementFrozen(element, true) setTimer(setElementFrozen, 1000, 1, element,false) break end end end end addEventHandler("onPlayerMarkerHit",root, onPlayerMarkerHit) addEvent("onPlayerBuyGarage",true) function onPlayerBuyGarage(marker) setElementData(marker,"owner", getAccountName(getPlayerAccount(source))) end addEventHandler("onPlayerBuyGarage",root,onPlayerBuyGarage) client function onClientResourceStart() botao = guiCreateButton(0.43, 0.47, 0.06, 0.05, "comprar", true) guiSetVisible(botao,false) end addEventHandler("onClientResourceStart", resourceRoot,onClientResourceStart) addEvent("onPlayerRequestGUI",true) function onPlayerRequestGUI(m) guiSetVisible(botao,true) showCursor(true) marker = m end addEventHandler("onPlayerRequestGUI",root,onPlayerRequestGUI) function onClientGUIClick() if source == botao then triggerServerEvent("onPlayerBuyGarage",localPlayer,marker) guiSetVisible(botao,false) showCursor(false) end end addEventHandler("onClientGUIClick", resourceRoot,onClientGUIClick)
-
Pedro e Banex, foi testado aqui e não tinha erro algum, deve ser um dos bugs do MTA que tem que fecha-lo e abrir de novo está trabalhando perfeito...
-
Indicação MTA:SA Contribuidor
#RooTs replied to SpoC^'s topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor)
Vlw man, sempre a disposição -
try this local hudTable = { "ammo", "armour", "clock", "health", "money", "weapon", "wanted", "area_name", "vehicle_name", "breath", "clock" } addEventHandler("onClientResourceStart", resourceRoot, function() for id, hudComponents in ipairs(hudTable) do showPlayerHudComponent(hudComponents, false) end end) addEventHandler("onClientResourceStop", resourceRoot, function() for id, hudComponents in ipairs(hudTable) do showPlayerHudComponent(hudComponents, true) end end)
-
Indicação MTA:SA Contribuidor
#RooTs replied to SpoC^'s topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor)
-
Indicação MTA:SA Contribuidor
#RooTs replied to SpoC^'s topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor)
é por necessidades assim que é me incentiva a continuar e ter mais forças @Adissonboy11, Obrigado cara -
script taken blog from of resources and textures stolen: https://community.multitheftauto.com/in ... s&id=10328 Original version by #nelson: http://www.mtabrasil.com.br/2014/05/ped ... ows-8.html history of hud viewtopic.php?f=108&t=81169 DONE
-
Hello friend, has some reason to you not do more part of our community?
-
Muito obrigado Ronaldo
-
my script example playSound3D and of file sound = playSound3D("http://servzika.net/Alesso.mp3", 1261.08752, -2018.86438, 59.388856, true) setSoundMaxDistance(sound, 40) setSoundMinDistance(sound, 1) setSoundVolume(sound, 100) example playSound in WIKI function wasted (killer, weapon, bodypart) local sound = playSound("sounds/wasted.mp3") --Play wasted.mp3 from the sounds folder setSoundVolume(sound, 0.5) -- set the sound volume to 50% end addEventHandler("onClientPlayerWasted", getLocalPlayer(), wasted) --add the event handler
-
setBlipVisibleDistance está setando a distancia que é os "150", ele pode estar mais atualizado, mais creio que isso seria mais util
-
Indicação MTA:SA Contribuidor
#RooTs replied to SpoC^'s topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor)
Obrigado man