local sx, sy = guiGetScreenSize();
local show = false;
render = function ()
-- // alap "kocka" \\ --
dxDrawRectangle(sx*0.38, sy*0.30, sx*0.26, sy*0.5, tocolor(0,0,0,180), false);
-- // keret \\ --
dxDrawRectangle(sx*0.38, sy*0.30, sx*0.002, sy*0.5, tocolor(255,0,0,210), false);
dxDrawRectangle(sx*0.64, sy*0.30, sx*0.002, sy*0.5, tocolor(255,0,0,210), false);
dxDrawRectangle(sx*0.38, sy*0.30, sx*0.26, sy*0.002, tocolor(255,0,0,210), false);
dxDrawRectangle(sx*0.38, sy*0.80, sx*0.26, sy*0.002, tocolor(255,0,0,210), false);
-- // premium panel irat es doboza \\ --
dxDrawRectangle(sx*0.38, sy*0.30, sx*0.26, sy*0.06, tocolor(0,0,0,150), false);
dxDrawText("Prémium Panel", sx*0.38, sy*0.35, sx*0.63, sy*0.36, tocolor(255,255,255), 2, "pricedown", "right", "bottom", false, false, false, false);
-- // jármű lehívó \\ --
-- tank --
dxDrawRectangle(sx*0.39, sy*0.38, sx*0.11, sy*0.070, tocolor(180, 102, 88, 178), false);
dxDrawImage(sx*0.42, sy*0.40, sx*0.05, sy*0.050, "img/Rhino.png")
dxDrawText("Tank", sx*0.62, sy*0.68, sx*0.46, sy*0.41, tocolor(255,255,255), 2, "clear", "right", "bottom", false, false, false, false);
-- hydra --
dxDrawRectangle(sx*0.52, sy*0.38, sx*0.11, sy*0.070, tocolor(180, 102, 88, 178), false);
-- // fegyverek \\ --
dxDrawText("Exlúzív fegyverek", sx*0.35, sy*0.35, sx*0.59, sy*0.49, tocolor(255,255,255), 2, "clear", "right", "bottom", false, false, false, false);
end
addEventHandler("onClientRender",root, render);
addEventHandler("onClientClick", root,
function (button, state)
if state then
if button == "left" then
if isCursorHover(sx*0.39, sy*0.38, sx*0.11, sy*0.070) then
-- Ide jön a tank lehívás, amit már megkéne tudnod magadtól csinálni.
-- Lényeg: szerver oldalon csinálod, triggerServerEvent (nézz utána wikin)
-- ahol van createVehicle (lekéred a játékos pozícióját, és adsz az x kordinátához + 5-t.
triggerServerEvent("event neve", localPlayer)
end
end
end
end);
isCursorHover = function (x, y, w, h)
if x and y and w and h then
if isCursorShowing() then
if not isMTAWindowActive() then
local cursorX, cursorY = getCursorPosition()
cursorX, cursorY = cursorX * sx, cursorY * sy;
if cursorX >= x and cursorX <= x + w and cursorY >= y and cursorY <= y + h then
return true;
end
end
end
end
return false;
end
bindKey("m", "down",
function ()
showCursor(not isCursorShowing());
end);