Witam, pisz? skrypt na prac? lecz spotka?em si? z kilkoma problemi na kt?re zaradzi? nie umiem.Pierwszy problem jest taki ?e gdy u?ywam detachElements to tak jakby robi tylko ?e si? kopiuje ten objekt a gracz dalej to ma, a kolejna jest z tym ?e nie dzia?a mi removeEventHandler w gui clicku.Mo?e wy macie pomys?y jak to zrobi?.
Kod:
[lua]
local marker1 = createMarker(378.57,-114.38,1001.49-1, "cylinder", 1.5, 35, 142, 35)
local sx,sy=guiGetScreenSize()
local data={ showed=nil, button={}, info=nil, misc=nil, }
setElementDimension(marker1, 5)
setElementInterior(marker1, 5)
function isMouseIn(psx,psy,pssx,pssy,abx,aby)
if not isCursorShowing() then return end
cx,cy=getCursorPosition()
cx,cy=cx*sx,cy*sy
if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then
return true,cx,cy
else
return false
end
end
function draw()
local screenW, screenH = guiGetScreenSize()
dxDrawLine((screenW * 0.2328) - 1, (screenH * 0.2633) - 1, (screenW * 0.2328) - 1, screenH * 0.7367, tocolor(54, 254, 27, 222), 1, false)
dxDrawLine(screenW * 0.7680, (screenH * 0.2633) - 1, (screenW * 0.2328) - 1, (screenH * 0.2633) - 1, tocolor(54, 254, 27, 222), 1, false)
dxDrawLine((screenW * 0.2328) - 1, screenH * 0.7367, screenW * 0.7680, screenH * 0.7367, tocolor(54, 254, 27, 222), 1, false)
dxDrawLine(screenW * 0.7680, screenH * 0.7367, screenW * 0.7680, (screenH * 0.2633)... |