Hello y'all! I need help. I wanna do this, when I click to the dxImage "phone.png" this image will be destroyed and the "phone_main.png" will draw. How can I do this? I tried to do "creatingMain" function to draw and destroy, however it ain't working. Thank you! Maybe it's the stupid question, but im just noob
local isImage = false
addEventHandler("onClientRender", root,
function()
if(isImage) then
block = dxDrawImage(969, 618, 220, 423, "phone.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) -- draw image if isImage true
function creatingMain()
dxDrawImage(969, 618, 220, 423, "phone_main.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
destroyElement(block)
end
addEventHandler ( "onClientClick", root, creatingMain)
-- dxDrawImage(969, 618, 220, 423, "phone_main.png", 0, 0, 0, tocolor(255, 255, 255, 255), true)
showCursor(true)
end
end
)
bindKey("i", "down",
function()
if(isImage) then
isImage = false
showCursor(false)
else
isImage = true
end
end
)