local screenW, screenH = guiGetScreenSize();
function makeMarker()
local x, y, z = getElementPosition(localPlayer);
theMarker = createMarker(x + 10, y + 10, z-1, \'cylinder\', 5, 255, 255, 255, 150);
local a, b, c = getElementPosition(theMarker);
outputChatBox(a ..\', \'.. b ..\', \'.. c);
end
addCommandHandler(\'marker\', makeMarker);
function makeMarkerImage()
local camX, camY, camZ = getCameraMatrix();
local a, b, c = getElementPosition(theMarker);
if (getDistanceBetweenPoints3D(camX, camY, camZ, a, b, c) <= 30) then
local screenX, screenY = getScreenFromWorldPosition(a, b, c + 2);
if screenX then
local scale = 1920 / screenW;
local width = (1141 / 3) / scale;
dxDrawImage(screenX - width / 2, screenY - screenH / 10, width, 307/3, \'files/images/signature.png\', 0, 0, 0, tocolor(255, 255, 255, 200));
end
end
end
addEventHandler(\'onClientRender\', root, makeMarkerImage);