Kazafka Posted February 3, 2020 Share Posted February 3, 2020 Code: pliki = { mapa = "files/colormap.png" } hud = { szer = 320, przez = 200 } addEventHandler("onClientResourceStart", resourceRoot, function() setPlayerHudComponentVisible("radar", false) minimap = dxCreateRenderTarget(hud.szer, hud.szer, true) end) addEventHandler("onClientResourceStop", resourceRoot, function() setPlayerHudComponentVisible("radar", true) end) addEventHandler("onClientRender", root, function() local x, y, z = getElementPosition(localPlayer) local r = getScreenRotationFromWorldPosition(x, y, z) dxSetRenderTarget(minimap, false) dxSetBlendMode("modulate_add") dxDrawImageSection(0, 0, 3000, 3000, x, y, 3000, 3000, pliki.mapa) dxSetRenderTarget() end) Output: NONE Why? Link to comment
Addlibs Posted February 3, 2020 Share Posted February 3, 2020 (edited) Cause you're only rendering onto a render-target. After you've rendered the contents in your render-target, you need to render the render-target itself as well. -- add this somewhere at the top in outermost scope local screenX, screenY = guiGetScreenSize() -- add this right after setting rendering target to screen (line 27) dxDrawImage(0, screenY - hud.przez, hud.szer, hud.przez, minimap) Edited February 3, 2020 by MrTasty Link to comment
Kazafka Posted February 3, 2020 Author Share Posted February 3, 2020 5 minutes ago, MrTasty said: you need to render the render-target itself as well K, that helped. I didnt knew about it :O Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now