Ramsey Posted June 28, 2017 Posted June 28, 2017 Hello MTA Communinty, I want to get help from you guys. Example ; sx, sy = guiGetScreenSize() window = guiCreateWindow(sx/2-300/2, sy/2-300/2, 300, 300, "Test Window", false) triggerEvent("convertDX", localPlayer, window) ------------------------------------------------------ addEvent("convertDX", true) addEventHandler("convertDX", getRootElement(), function(window) guiSetAlpha(window,0) --Here I want to get help, the code here will transform the gui element into dx. end) Thank you very much, I tried, but I could not find it.
Hale Posted June 28, 2017 Posted June 28, 2017 In that "convertDX" event handler, add another event handler that will make the DX show. Here's an example: addEvent("convertDX", true) addEventHandler("convertDX", getRootElement(), function(window) guiSetAlpha(window,0) addEventHandler("onClientRender", localPlayer, drawDX) end) function drawDX() --all the drawings go here end
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