[Yardım] Radar - Blip

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

Çevrimdışı Minato

  • Bilgin Üye
  • *
    • İleti: 285
: 13 Temmuz 2020, 22:18:27
Serverdaki oyuncuları radarda göstermiyor yardım edebilcek var mı ??

Kod
local screenW,screenH = guiGetScreenSize()
local resW,resH = 1500,727
local sW,sH =  (screenW/resW), (screenH/resH)

    local turn = true
    local alpha = 255

addEventHandler( "onClientResourceStart", resourceRoot,
function()
    setPlayerHudComponentVisible ( "radar", false )

        hudMaskFX = dxCreateShader("mask.fx")
radarTexture = dxCreateTexture("img/map.png")
maskTexture = dxCreateTexture("img/radar_mask.png")
checkTextures = ( hudMaskFX and radarTexture and maskTexture )

if not ( checkTextures ) then
outputChatBox( "" )
else
dxSetShaderValue( hudMaskFX, "sPicTexture", radarTexture )
dxSetShaderValue( hudMaskFX, "sMaskTexture", maskTexture )
end
end
)

    function drawRadar()
if not ( checkTextures ) then return end
        dxSetShaderValue( hudMaskFX, "sMaskTexture", maskTexture )

local x,y = getElementPosition( localPlayer )
local zoom = 18
    x = ( x ) / 6000
    y = ( y ) / -6000
dxSetShaderValue( hudMaskFX, "gUVPosition", x,y )
dxSetShaderValue( hudMaskFX, "gUVScale",0.8/zoom, 1/zoom )

local _, _, c_Rot = getElementRotation( getCamera());
local _, _, p_Rot = getElementRotation( localPlayer )
    dxSetShaderValue( hudMaskFX, "gUVRotAngle", math.rad( -c_Rot ))

-- if getElementData(getLocalPlayer(),"GPS") >= 1  then
setPlayerHudComponentVisible ( "radar", false )
dxDrawImage(0*sW, 592*sH, 216*sW, 183*sH, "img/radar_cover.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
        dxDrawImage(0*sW, 598*sH, 197*sW, 125*sH, hudMaskFX, 0,0,0, tocolor(255,255,255,255))
        dxDrawImage(90*sW, 655*sH, 21*sW, 21*sH, "img/radar_player.png", -p_Rot+c_Rot, 0, 0, tocolor(255, 255, 255, 220))
end

addEventHandler( "onClientRender", root, drawRadar)

addEventHandler( "onClientResourceStop", resourceRoot,
function()
    setPlayerHudComponentVisible ( "radar", true )
end)
DRIFT MASTERS
 


MTASATURK

[Yardım] Radar - Blip
« : 13 Temmuz 2020, 22:18:27 »

Çevrimdışı Ky

  • Uzman Üye
  • *
    • İleti: 614
Yanıtla #1 : 13 Temmuz 2020, 22:36:59
start playerblips
 
Mesajı Beğenenler: Minato


Çevrimdışı Minato

  • Bilgin Üye
  • *
    • İleti: 285
Yanıtla #2 : 13 Temmuz 2020, 22:38:05
Linki görebilmek için Kayıt olun yada Giriş yapın.
start playerblips

onu denedim olmadı
DRIFT MASTERS
 


Çevrimdışı EqinoX

  • Acemi Üye
  • *
    • İleti: 172
  • Furkan
Yanıtla #3 : 13 Temmuz 2020, 23:20:06
Eğer freeroam server ise freeroam paneli deaktif olduğu zaman player blip lerini göstermiyor başka bir freeroam panel atıp deneyebilirmisin ?
Linki görebilmek için Kayıt olun yada Giriş yapın.
 


Çevrimdışı #Learnt

  • Yeni Üye
  • *
    • İleti: 35
Yanıtla #4 : 13 Temmuz 2020, 23:23:41
Linki görebilmek için Kayıt olun yada Giriş yapın.
Serverdaki oyuncuları radarda göstermiyor yardım edebilcek var mı ??

Kod
local screenW,screenH = guiGetScreenSize()
local resW,resH = 1500,727
local sW,sH =  (screenW/resW), (screenH/resH)

    local turn = true
    local alpha = 255

addEventHandler( "onClientResourceStart", resourceRoot,
function()
    setPlayerHudComponentVisible ( "radar", false )

        hudMaskFX = dxCreateShader("mask.fx")
radarTexture = dxCreateTexture("img/map.png")
maskTexture = dxCreateTexture("img/radar_mask.png")
checkTextures = ( hudMaskFX and radarTexture and maskTexture )

if not ( checkTextures ) then
outputChatBox( "" )
else
dxSetShaderValue( hudMaskFX, "sPicTexture", radarTexture )
dxSetShaderValue( hudMaskFX, "sMaskTexture", maskTexture )
end
end
)

    function drawRadar()
if not ( checkTextures ) then return end
        dxSetShaderValue( hudMaskFX, "sMaskTexture", maskTexture )

local x,y = getElementPosition( localPlayer )
local zoom = 18
    x = ( x ) / 6000
    y = ( y ) / -6000
dxSetShaderValue( hudMaskFX, "gUVPosition", x,y )
dxSetShaderValue( hudMaskFX, "gUVScale",0.8/zoom, 1/zoom )

local _, _, c_Rot = getElementRotation( getCamera());
local _, _, p_Rot = getElementRotation( localPlayer )
    dxSetShaderValue( hudMaskFX, "gUVRotAngle", math.rad( -c_Rot ))

-- if getElementData(getLocalPlayer(),"GPS") >= 1  then
setPlayerHudComponentVisible ( "radar", false )
dxDrawImage(0*sW, 592*sH, 216*sW, 183*sH, "img/radar_cover.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
        dxDrawImage(0*sW, 598*sH, 197*sW, 125*sH, hudMaskFX, 0,0,0, tocolor(255,255,255,255))
        dxDrawImage(90*sW, 655*sH, 21*sW, 21*sH, "img/radar_player.png", -p_Rot+c_Rot, 0, 0, tocolor(255, 255, 255, 220))
end

addEventHandler( "onClientRender", root, drawRadar)

addEventHandler( "onClientResourceStop", resourceRoot,
function()
    setPlayerHudComponentVisible ( "radar", true )
end)

Bu kodlar sadece tasarımı göstermek amaçlı, blip fonksiyonu görmüyorum ben burada.
 


Çevrimdışı Minato

  • Bilgin Üye
  • *
    • İleti: 285
Yanıtla #5 : 13 Temmuz 2020, 23:34:22
Linki görebilmek için Kayıt olun yada Giriş yapın.
Bu kodlar sadece tasarımı göstermek amaçlı, blip fonksiyonu görmüyorum ben burada.

blips ekleyince calışmıyor denemiştik
DRIFT MASTERS
 


MTASATURK

Ynt: [Yardım] Radar - Blip
« Yanıtla #5 : 13 Temmuz 2020, 23:34:22 »