function drawDX()
dxDrawImage(650, 82, 520, 522, "painelpmerj.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
dxDrawRectangle(852, 255, 117, 24, tocolor(0, 0, 0, 110), false)
dxDrawRectangle(852, 289, 117, 24, tocolor(0, 0, 0, 110), false)
dxDrawRectangle(852, 323, 117, 24, tocolor(0, 0, 0, 110), false)
dxDrawRectangle(852, 357, 117, 24, tocolor(0, 0, 0, 110), false)
dxDrawRectangle(868, 401, 91, 22, tocolor(0, 0, 0, 110), false)
dxDrawText("Farda 04", 853, 357, 969, 381, tocolor(255, 255, 255, 200), 1.00, "default-bold", "center", "center", false, false, false, false, false)
dxDrawText("Farda 03", 852, 323, 968, 347, tocolor(255, 255, 255, 200), 1.00, "default-bold", "center", "center", false, false, false, false, false)
dxDrawText("Farda 02", 852, 289, 968, 313, tocolor(255, 255, 255, 200), 1.00, "default-bold", "center", "center", false, false, false, false, false)
dxDrawText("Farda 01", 852, 255, 968, 279, tocolor(255, 255, 255, 200), 1.00, "default-bold", "center", "center", false, false, false, false, false)
dxDrawText("Fechar", 867, 399, 959, 423, tocolor(255, 255, 255, 200), 0.90, "default-bold", "center", "center", false, false, false, false, false)
end
local isDxShowing = false
function gerenciaPainel ()
if not isDxShowing then
addEventHandler ("onClientRender", getRootElement(), drawDX)
showCursor (true)
isDxShowing = true
else
removeEventHandler ("onClientRender", getRootElement(), drawDX)
showCursor (false)
isDxShowing = false
end
end
addEvent ("ativaPainel", true)
addEventHandler ("ativaPainel", getRootElement(), gerenciaPainel)
addEventHandler ("onClientClick", getRootElement(), function (button, state, absoluteX, absoluteY)
if (button == "left") and (state == "up") and isDxShowing then
if absoluteX >= 860 and absoluteX <= 960 and absoluteY >= 400 and absoluteY <= 430 then
gerenciaPainel ()
end
end
end)
theMarker = createMarker ( 1570.39 + 2, -1646.26206545297 + 2, 16.1, "cylinder", 1.5, 30, 144, 255, 30 )
addEventHandler ("onMarkerHit", theMarker, function (hitElement)
if hitElement and getElementType (hitElement) == "player" then
local account = getAccountName (getPlayerAccount (hitElement))
if isObjectInACLGroup ("user."..account, aclGetGroup ("PM")) then
triggerClientEvent (hitElement, "ativaPainel", hitElement)
end
end
end)