Hey Leute ,
habe ein Problem undzwar will ich nur ein bestimmten Teil von meiner Mini-Map zeigen lassen - das heißt nur so bis auf 250 Meter.
Habe das Script von xFabian genommen weis aber niht wie ich das machen soll ????
mfg
Script :
Spoiler anzeigen
Lua
addEventHandler("onClientResourceStart", resourceRoot, function()
showPlayerHudComponent("radar", false)
end)
addEventHandler("onClientRender",root, function()
local design = "map"
local px,py,pz = getElementPosition(localPlayer)
local scale = 1
local font = "pricedown"
local text_box = ""
local font_height = dxGetFontHeight(scale, font )
local screenx, screeny = guiGetScreenSize()
local bx = 325
local by = 325
local ppx = 5
local ppy = 5
local box_screen_x = (screenx/100)
local box_screen_y = (screeny/100 *98)- by
local font_screen_x = (screenx/100) + (bx/2) - 5*string.len(text_box)
local font_screen_y = (screeny/100 *98)- by -font_height
local point_x = (3000+px)/6000*325
local point_y = (3000-py)/6000*325
dxDrawText(text_box,font_screen_x,font_screen_y,1000,1000,tocolor(74,99,105,350),1.0,font,"left","top",false,false,false) -- text
dxDrawImage(box_screen_x, box_screen_y,bx,by,"files/"..design..".png")
dxDrawImage(box_screen_x+point_x, box_screen_y+point_y, ppx, ppy,"files/redicon.png")
for i, v in ipairs( getElementsByType('player') ) do
if v ~= localPlayer then
local apx,apy,apz = getElementPosition(v)
local point_xx = (3000+apx)/6000*325
local point_yy = (3000-apy)/6000*325
dxDrawImage(box_screen_x+point_xx, box_screen_y+point_yy, ppx, ppy,"files/blueicon.png")
end
end
end)
Alles anzeigen