Witam po klikni?ciu w dane miejsce powinno si? wy?wietli? zdj?cie na ekranie lecz to zdj?cie si? nie wy?wietla tylko mignie na sekund? i si? wy??czy wie kto? mo?e o co chodzi ?
Doda?em i nadal to samo na chwil? si? pojawi i zniknie a b??d ten sam.
function omamale(btn,state)
if btn=="left" and state=="down" then
local x_6, y_6 = getCenter(515, -530)
if isMouseIn(x_6, y_6, 515/zoom, 530/zoom) then
destroyElement(texture_1)
local texture_7 = dxCreateTexture('img/2panel.png','argb',true,'clamp')
local x_7, y_7 = getCenter(1920, 1080)
dxDrawImage(x_7, y_7, 1920/zoom, 1080/zoom, texture_7, 0, 0, 0, tocolor(255, 255, 255, 255), false)
end
end
end
function masno()
addEventHandler("onClientClick", root,omamale)
addEventHandler("onClientRender", root, omamale)
end
addEventHandler("onClientResourceStart",resourceRoot, masno)
draw=function()
dxDrawImage(x_7, y_7, 1920/zoom, 1080/zoom, texture_7, 0, 0, 0, tocolor(255, 255, 255, 255), false)
end
function omamale(btn,state)
if btn=="left" and state=="down" then
local x_6, y_6 = getCenter(515, -530)
if isMouseIn(x_6, y_6, 515/zoom, 530/zoom) then
destroyElement(texture_1)
local texture_7 = dxCreateTexture('img/2panel.png','argb',true,'clamp')
local x_7, y_7 = getCenter(1920, 1080)
addEventHandler("onClientRender",root,draw)
end
end
end
addEventHandler("onClientClick", root,omamale)
Bo ja ci podalem przyklad konstrukcji, nie gotowca.
draw=function()
local texture_7 = dxCreateTexture('img/2panel.png','argb',true,'clamp')
local x_7, y_7 = getCenter(1920, 1080)
dxDrawImage(x_7, y_7, 1920/zoom, 1080/zoom, texture_7, 0, 0, 0, tocolor(255, 255, 255, 255), false)
end
function omamale(btn,state)
if btn=="left" and state=="down" then
local x_6, y_6 = getCenter(515, -530)
if isMouseIn(x_6, y_6, 515/zoom, 530/zoom) then
addEventHandler("onClientRender",root,draw)
end
end
end
addEventHandler("onClientClick", root,omamale)
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach