Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2018-03-30, 22:49


Rumper

Majster od pysa






Wiek: 15
Na forum: 3457 dni
Posty: 231
Nick w MP: Rumper

Piwa: 592

Respekt: 180
Respekt: 180Respekt: 180

Ostrzeżeń: 20%
Witam, bo posiadam radar z vmta i mi wogule nie dzia?a,w?onczy?em go i wogule sie nie wy?wietla.
Za pomoc daje :piwo:

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
bartek.pl123
Wysłany: 2018-03-30, 22:52


Ciastuuś

As-salamu alaykum






Wiek: 27
Na forum: 3212 dni
Posty: 800
Nick w MP: Ciastuuś

Piwa: 4304

Respekt: 640
Respekt: 640Respekt: 640

"Lolelo" napisał/a:

Witam, bo posiadam radar z vmta i mi wogule nie dzia?a,w?onczy?em go i wogule sie nie wy?wietla.
Za pomoc daje :piwo:


Poka? b??dy z /debugscript 3

Podpis
As-salamu alaykum
Ostatnio zmieniony przez Ciastuuś 2018-03-30, 22:56, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-30, 22:53


boszboszek

HEY






Wiek: 14
Na forum: 3647 dni
Posty: 146
Nick w MP: boszboszek

Piwa: 2176

Respekt: 261
Respekt: 261Respekt: 261Respekt: 261

Wy?wietla si? co? w debugscript3?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-30, 23:09


Rumper

Majster od pysa






Wiek: 15
Na forum: 3457 dni
Posty: 231
Nick w MP: Rumper

Piwa: 592

Respekt: 180
Respekt: 180Respekt: 180

Ostrzeżeń: 20%
WARNING: vmta-radar/client.lua(Line 37) [Client] showPlayerHudComponent is deprecated and may not work in future versions. Please replace with setPlayerHudComponentVisible.
Takie co? mam w konsoli

Podpis
Elo benc
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-30, 23:12


Ciastuuś

As-salamu alaykum






Wiek: 27
Na forum: 3212 dni
Posty: 800
Nick w MP: Ciastuuś

Piwa: 4304

Respekt: 640
Respekt: 640Respekt: 640

"Lolelo" napisał/a:

WARNING: vmta-radar/client.lua(Line 37) [Client] showPlayerHudComponent is deprecated and may not work in future versions. Please replace with setPlayerHudComponentVisible.
Takie co? mam w konsoli


Posiadasz funkcj? 'showPlayerHudComponent' ,kt?ra nie dzia?a w wersji MTA, kt?rej u?ywasz. Zamie? j? na setPlayerHudComponentVisible, aby wszystko by?o dobrze. ;)

Podpis
As-salamu alaykum
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-30, 23:18


Rumper

Majster od pysa






Wiek: 15
Na forum: 3457 dni
Posty: 231
Nick w MP: Rumper

Piwa: 592

Respekt: 180
Respekt: 180Respekt: 180

Ostrzeżeń: 20%
Nadal nie dzia?a

Podpis
Elo benc
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-30, 23:21


Ciastuuś

As-salamu alaykum






Wiek: 27
Na forum: 3212 dni
Posty: 800
Nick w MP: Ciastuuś

Piwa: 4304

Respekt: 640
Respekt: 640Respekt: 640

"Lolelo" napisał/a:

Nadal nie dzia?a


Nie pisz, ?e dalej nie dzia?a tylko podaj dalsze b??dy bo robisz nie potrzebny spam.

Podpis
As-salamu alaykum
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-30, 23:24


Rumper

Majster od pysa






Wiek: 15
Na forum: 3457 dni
Posty: 231
Nick w MP: Rumper

Piwa: 592

Respekt: 180
Respekt: 180Respekt: 180

Ostrzeżeń: 20%
Nie mam ?adnych b?edn?w.
A ?eby nie robi? spamu to tu masz kod
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


local worldW, worldH = 3072, 3072
local blip = 14
local turn = true
local alpha = 255
local sRotating = 0
local rt = dxCreateRenderTarget(290, 175)


function findRotation(x1,y1,x2,y2) 
  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) 
    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()
        if getElementData(localPlayer,"logged") then
        setPlayerHudComponentVisible("radar", false)
            if disableGTASAhealth then setPlayerHudComponentVisible("health", false) end
            if disableGTASAarmor then setPlayerHudComponentVisible("armour", false) end
            if disableGTASAoxygen then setPlayerHudComponentVisible("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())
                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((18+5)*sW, screenH-((179+5))*sH, (275-10)*sW, (135)*sH, rt, 0, 0, 0, tocolor(255, 255, 255, 200))
        
        --# Get rotations
        local _, _, c_Rot = getElementRotation( getCamera());
        local _, _, p_Rot = getElementRotation( localPlayer )        
      
        --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)        
        
        
        --# Wanted
        local g_wl = getPlayerWantedLevel( localPlayer )
        if ( g_wl > 0 ) then
            if ( turn == true ) then
                alpha = alpha + 5
                    if ( alpha > 255 ) then
                        alpha = 255
                        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
end
addEventHandler( "onClientRender", root, drawRadar)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-31, 01:42


DevJumpDj

VILLAGE MTA






Wiek: 27
Na forum: 3616 dni
Posty: 109
Nick w MP: D4NTE

Piwa: 3331

Respekt: 121
Respekt: 121

Masz tutaj dzia?aj?cy kod:

local screenW,screenH = guiGetScreenSize()
local resW,resH = 1280,720
local sW,sH =  (screenW/resW), (screenH/resH)

local alwaysRenderMap = false
local alwaysRenderOxygen = false
local disableGTASAhealth = true
local disableGTASAarmor = true
local disableGTASAoxygen = true
local enableBlipDistance = true

local worldW, worldH = 3072, 3072
local blip = 14
local turn = true
local alpha = 255
local sRotating = 0
local rt = dxCreateRenderTarget(290, 175)


function findRotation(x1,y1,x2,y2) 
  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) 
    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()
        --if getElementData(localPlayer,"gram") then
        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())
                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((18+5)*sW, screenH-((179+5))*sH, (275-10)*sW, (135)*sH, rt, 0, 0, 0, tocolor(255, 255, 255, 200))
        
        --# Get rotations
        local _, _, c_Rot = getElementRotation( getCamera());
        local _, _, p_Rot = getElementRotation( localPlayer )        
      
        --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)        
        
        
        --# Wanted
        local g_wl = getPlayerWantedLevel( localPlayer )
        if ( g_wl > 0 ) then
            if ( turn == true ) then
                alpha = alpha + 5
                    if ( alpha > 255 ) then
                        alpha = 255
                        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
end
addEventHandler( "onClientRender", root, drawRadar)

function usunElementy()
    setPlayerHudComponentVisible("ammo",false)
    setPlayerHudComponentVisible("armour",false)
    setPlayerHudComponentVisible("clock",false)
    setPlayerHudComponentVisible("health",false)
    setPlayerHudComponentVisible("breath",false)
    setPlayerHudComponentVisible("money",false)
    setPlayerHudComponentVisible("weapon",false)
end
usunElementy()


Podpis


VILLAGE MTA - www.villagemta.pl
D4NTE Właściciel serwera
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 2 piw(a):
Rumper, maksio41
Wysłany: 2018-03-31, 09:12


Rumper

Majster od pysa






Wiek: 15
Na forum: 3457 dni
Posty: 231
Nick w MP: Rumper

Piwa: 592

Respekt: 180
Respekt: 180Respekt: 180

Ostrzeżeń: 20%
Dzi?ki leci :piwo: ,
Do zamkni?cia

Podpis
Elo benc
Postaw piwo autorowi tego posta
 

 
Tagi: radar :: vibemta
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku