local sx,sy = guiGetScreenSize()local cx,cy = getCursorPosition ()local cx,cy = cx*sx,cy*syif cx > --[kezdeti X kordi]-- and cy > --[kezdeti Y kordi]-- and cx < --[vége X kordi]-- and cy < --[vége Y kordi]-- then--bennevanelse--nincs benne
function truck.handleRender ( rotatedX, rotatedY, vehZ, compX, compY, compZ ) local sx,sy = getScreenFromWorldPosition(compX,compY,compZ+0.2) local x,y,z = getElementPosition(localPlayer) if sx and sy then local distance2 = getDistanceBetweenPoints3D(x,y,z,compX,compY,compZ+0.2) local distance2 = distance2-(distance2/3) local progress = distance2/12.5 local screenx, screeny, worldx, worldy, worldz = getCursorPosition() local scale = interpolateBetween(0.7, 0, 0, 0, 0, 0, progress, \"OutQuad\") dxDrawRectangle(sx,sy,130*scale,120*scale,tocolor(0,0,0,195)) dxDrawImage(sx,sy,128*scale,128*scale,\"files/open.png\",0,0,0,tocolor(124,197,118,175)) endend
local screenX, screenY = guiGetScreenSize()function truck.handleRender ( rotatedX, rotatedY, vehZ, compX, compY, compZ )local sx,sy = getScreenFromWorldPosition(compX,compY,compZ+0.2)local x,y,z = getElementPosition(localPlayer)if sx and sy then local distance2 = getDistanceBetweenPoints3D(x,y,z,compX,compY,compZ+0.2) local distance2 = distance2-(distance2/3) local progress = distance2/12.5 local scale = interpolateBetween(0.7, 0, 0, 0, 0, 0, progress, \"OutQuad\") if isCursorShowing() then local relativeX, relativeY = getCursorPosition() local absoluteX, absoluteY = relativeX * screenX, relativeY * screenY local boxSize = 128 * scale local boxX, boxY = sx - (boxSize / 2), sy - (boxSize / 2) if absoluteX >= boxX and absoluteX <= boxX + boxSize and absoluteY >= boxY and absoluteY <= boxY + boxSize then -- mi történjen ha ráviszi a kurzort end end dxDrawRectangle(sx,sy,130*scale,120*scale,tocolor(0,0,0,195)) dxDrawImage(sx,sy,128*scale,128*scale,\"files/open.png\",0,0,0,tocolor(124,197,118,175))endend