Jump to content

Ayuda alguien me explica esto ?


iSmokee

Recommended Posts

Posted
  
local sX, sY = guiGetScreenSize() 
  
function PanelModa() 
    CursorX, CursorY = getCursorPosition() 
    dxDrawText("X: " .. CursorX .. " Y: " .. CursorY, sX*0.371875, sY*0.275, sX*0.628125, sY*0.3041666666666667, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) 
end 
  
function cambiarVentanas(button, state) 
if state == "up" then 
return 
end 
local CursorX, CursorY = getCursorPosition()  
    if CursorX >= 0.3762499980 and CursorX <= 0.6162499785 and CursorY >= 0.70333331 and CursorY <= 0.73500001430511 then  
 outputChatBox("ola") 
    end 
end 
addEventHandler("onClientClick", getRootElement(), cambiarVentanas) 
function abrir() 
    bindKey("l", "down", 
        function() 
                if not visible then 
                addEventHandler("onClientRender", root, PanelModa ) 
                showCursor( true ) 
                showChat( false ) 
            else 
                removeEventHandler("onClientRender", root, PanelModa ) 
                showCursor( false ) 
                showChat( true ) 
            end 
        end 
    ) 
end 
addEventHandler("onClientResourceStart", resourceRoot, abrir) 
  

Posted

si ya lo se pero yo quiero saber como se hace para poner la posicion del cursor

  
local CursorX, CursorY = getCursorPosition() 
    if CursorX >= 0.3762499980 and CursorX <= 0.6162499785 and CursorY >= 0.70333331 and CursorY <= 0.73500001430511 then 
 outputChatBox("ola") 
    end 
end 
  

Posted

No entiendo la pregunta... La posición del cursor la consigues con lo de arriba, abajo simplemente pones las posiciones.

Currently developing for International Gaming Community - Join us!

Posted
if CursorX >= 0.3762499980 and CursorX <= 0.6162499785 and CursorY >= 0.70333331 and CursorY <= 0.73500001430511 then 

-- Si el mouse esta en un posicion mayor al primer digito, y menor al segundo, continua, y si esta dentro de un numero mayor al tercero, y menor al 4° continua.

eso me habian explicado pero no entendi .-.

  • Recently Browsing   0 members

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