Jump to content

[HELP] dxDrawMaterialLine3D Showing Pixels


Recommended Posts

Hi guys , i am new in the lua i wanna create 3d panel for lua but i have a some problems , thanks you too much help "Sorry for my bad english :("

Problem (Look at images)

My Panel :

N1A0Na.png

 

Other 3D Panel (Drift Paradise) :

PrkJzO.png

 

Source Code :

local UI = exports.justUI

local isVisible = false
local isLogged = false
local screenWidth, screenHeight = UI:getScreenSize()

local selectWidth = 300
local selectHeight = 100
local selectScreenTarget = dxCreateRenderTarget(selectWidth,selectHeight,true)
local selectX , selectY, selectZ = 1692.44592, 1440.91260, 10.76481

function show()
    if isVisible == false then
        setElementData(localPlayer,"player:logged",0)
        showChat(false)

        addEventHandler("onClientRender",getRootElement(),render3D)
    end
end

function render3D()
    -- Select Screen
    dxSetRenderTarget(selectScreenTarget, true )

    dxDrawRectangle(0,0,selectWidth,selectHeight,tocolor(255,255,255,255),false)
    dxDrawRectangle(0,0,selectWidth,50,tocolor(0,255,0,255),false)

    dxSetRenderTarget()

    dxDrawMaterialLine3D (selectX,selectY,selectZ + 1,selectX,selectY,selectZ,selectScreenTarget,3, tocolor(255,255,255,255),1,1,1)
end

addEventHandler("onClientResourceStart", resourceRoot, function ()
    if isLogged == false then
        show()
    end
end)

 

Link to comment
  • Moderators
3 hours ago, #RJ said:

i dont know , (screen resolution 1920x1080)

I am talking about this:

 

local selectWidth = 300
local selectHeight = 100

 

 

 

But if that doesn't work, there is also:

https://wiki.multitheftauto.com/wiki/DxSetShaderTransform

Which I prefer if it is UI.

 

Shader needed for this? (most simple possible shader can be used)

texture gTexture;

technique IIYAMA
{
    pass P0
    {
        Texture[0] = gTexture;
    }
}

 

Edited by IIYAMA
Link to comment
13 hours ago, MysticEmpire said:

This is paradise GUI systems, It is not your. You just only changed the file name.


local UI = exports.justUI

local isVisible = false
local isLogged = false
local screenWidth, screenHeight = UI:getScreenSize()

 

@MysticEmpire Yeah , i edited DriftParadise UI system for my scripts , the legacy version for developers on github (https://github.com/StrixG/driftparadise-legacy) not same

 

@IIYAMA i try this wait for reply thanks

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...