Jump to content

Help me


MrStein

Recommended Posts

Hello, I wanted to make a floating image more I've seen the function in the MTA WIKI more only gives error
 

How I did it

local face = dxCreateTexture("weed.png")
addEventHandler("onClientRender", root,
    function()
        dxDrawImage3D(-2410.76001, -600.35828, 132.64066, face, tocolor(255,255,255,255))
    end
)

More No It works :(

Edited by MrStein
Link to comment

The function dxDrawImage3D is a Useful/Custom function meaning you need to add this function to your code for it to work.

Also use the code button <> when posting code.

local white = tocolor(255,255,255,255)
function dxDrawImage3D(x,y,z,w,h,m,c,r,...)
        local lx, ly, lz = x+w, y+h, (z+tonumber(r or 0)) or z
	return dxDrawMaterialLine3D(x,y,z, lx, ly, lz, m, h, c or white, ...)
end

local face = dxCreateTexture("weed.png")
addEventHandler("onClientRender", root,
    function()
        dxDrawImage3D(-2410.76001, -600.35828, 132.64066, face, tocloro(255,255,255,255))
    end
)

 

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...