Hy my friends
i'm currently stuck in a very annoying bug of MTA (, isnt it?)
If I use GuiStaticImageLoadImage and change the image of this element, all other StaticImages, that are parented inside this element, also gets changed. So it propagates down to each child element. Damnit!
Is there a way to fix this? I just want to change ONE Image and the child elements should stay the same.
A quick example:
local frame, image
addEventHandler("onClientResourceStart", resourceRoot, function()
frame = guiCreateStaticImage(0, 0, 400, 400, "frame.png", false)
image = guiCreateStaticImage(100, 100, 200, 200, "image.png", false, frame)
bindKey("i", "down", changeImage)
end)
function changeImage()
guiStaticImageLoadImage(frame, "otherframe.png")
end
<meta>
<info name="Test" author="Launemax" version="1.0" type="script" />
<script src="client.lua" type="client" />
<file src="frame.png" />
<file src="image.png" />
<file src="otherframe.png" />
</meta>