Jump to content

AJUDA


Recommended Posts

Bom começei criar alguns paineis pelo guieditor dai estou tentando faze-los funcionar dai tentei colocar um button mas o button nao apareceu

sx,sy = guiGetScreenSize() 
px,py = 1366,768 
x,y =  (sx/px), (sy/py) 
  
local marker = createMarker (2370.80835 ,-1779.51526 ,12.54688 ,"Cylinder" ,2, 6, 183, 248, 153) 
  
      
function Draw() 
        dxDrawRectangle(269, 149, 349, 360, tocolor(4, 3, 3, 114), false) 
        dxDrawRectangle(269, 170, 38, 0, tocolor(255, 255, 255, 255), false) 
        dxDrawRectangle(270, 152, 348, 51, tocolor(1, 9, 107, 251), false) 
        dxDrawText("", 338, 187, 338, 187, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) 
        dxDrawText("  MISSION 01", 315, 162, 527, 211, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "left", "top", false, false, false, false, false) 
        dxDrawText("Ola Preciso de um favor seu  Roube Um infernus ", 277, 221, 591, 250, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) 
        dxDrawText("ele esta localizado  na praia esta tendo uma disputa", 277, 250, 623, 274, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) 
        dxDrawText("tras para min sem danifica- lo", 277, 280, 607, 298, tocolor(255, 255, 255, 255), 1.00, "sans", "left", "top", false, false, false, false, false) 
    end 
  
  
  
function markerHit (hitPlayer, matchingDimension) 
    if not isEventHandlerAdded("onClientRender",root,Draw) then 
        addEventHandler("onClientRender", root, Draw) 
    end 
end 
addEventHandler ("onClientMarkerHit", marker, markerHit) 
function isEventHandlerAdded( sEventName, pElementAttachedTo, func ) 
        if type( sEventName ) == 'string' and 
                isElement( pElementAttachedTo ) and 
                type( func ) == 'function' then 
                local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo ) 
                if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then 
                        for i, v in ipairs( aAttachedFunctions ) do 
                                if v == func then 
                                        return true 
                                end 
                        end 
                end 
        end 
        return false 
end 
function addLabelOnClick(button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement ) 
if isMouseInPosition(269,482, 101,27) then 
    if ( not isCursorShowing ( ) ) then 
        return false 
    end 
  
    local sx, sy = guiGetScreenSize ( ) 
    local cx, cy = getCursorPosition ( ) 
    local cx, cy = ( cx * sx ), ( cy * sy ) 
    if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then 
        return true 
    else 
        return false 
    end 
end 
end 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...