Jump to content

dxDrawText


Sasu

Recommended Posts

    function select() 
    addEventHandler("onClientRender", getLocalPlayer(), draw) 
    showCursor(true) 
    setElementFrozen(localPlayer, true) 
    end 
addEventHandler("onClientPlayerJoin", getLocalPlayer(), onSelectLanguage) 

Why this dont work?

Link to comment
  
function select() 
           addEventHandler("onClientRender", getLocalPlayer(), draw) 
    showCursor(true) 
           setElementFrozen(localPlayer, true) 
    end 
addEventHandler("onClientResourceStart", getLocalPlayer(), select) 

Edited by Guest
Link to comment

Ahh yes. You are right. Well, I asked you solid about this :

function clickSelect(button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement) 
   local showing = isCursorShowing () 
   if showing then 
   local x1, y1, wx, wy, wz = getCursorPosition() 
   if x1 == 0.18671875 and y1 == 0.401 then 
   removeEventHandler("onClientRender", getLocalPlayer(), draw) 
    showCursor(false) 
    setElementFrozen(localPlayer, false) 
   setElementData( localPlayer, "Idioma", "Español") 
   elseif x1 == 0.551 and y1 == 0.401 then 
   removeEventHandler("onClientRender", getLocalPlayer(), draw) 
    showCursor(false) 
    setElementFrozen(localPlayer, false) 
   setElementData( localPlayer,  "Idioma", "English") 
   end 
   end 
   end 
addEventHandler("onClientClick", root, clickSelect) 
    

I tested but dont works.

Link to comment

Nothing :_

function clickSelect(button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement) 
   local showing = isCursorShowing () 
   if showing then 
   local x1, y1, wx, wy, wz = getCursorPosition() 
   if x1 == x*0.18671875 and y1 == y*0.401 then 
   removeEventHandler("onClientRender", getLocalPlayer(), draw) 
   outputChatBox("Ha seleccionado el Idioma \"Español\" .", 0, 255, 0, false) 
    showCursor(false) 
    setElementFrozen(localPlayer, false) 
   setElementData( localPlayer, "Idioma", "Español") 
   elseif x1 == x*0.551 and y1 == y*0.401 then 
   removeEventHandler("onClientRender", getLocalPlayer(), draw) 
   outputChatBox("You selected the language \"English\" .", 0, 255, 0, false) 
    showCursor(false) 
    setElementFrozen(localPlayer, false) 
   setElementData( localPlayer,  "Idioma", "English") 
   end 
   end 
   end 
addEventHandler("onClientClick", root, clickSelect) 

See the dx:

    function draw() 
        dxDrawRectangle(0, 0, x*1, y*1, tocolor(0, 0, 0, 206), false) 
        dxDrawImage(x*0.18671875, y*0.401, x*0.275, y*0.322, "images/espanol.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) 
        dxDrawImage(x*0.551, y*0.401, x*0.275, y*0.322, "images/ingles.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) 
        dxDrawText("Elige tu idioma / Select your language", x*0.17421875, y*0.0846354166666667, x*0.83984375, y*0.1640625, tocolor(255, 255, 255, 255), 2.00, "pricedown", "left", "top", false, false, true, false, false) 
        dxDrawText("Español", x*0.2546875, y*0.2994791666666667, x*0.39296875, y*0.3645833333333333, tocolor(255, 255, 255, 255), 2.00, "pricedown", "left", "top", false, false, true, false, false) 
        dxDrawText("English", x*0.6140625, y*0.2994791666666667, x*0.740625, y*0.3671875, tocolor(255, 255, 255, 255), 2.00, "pricedown", "left", "top", false, false, true, false, false) 
    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...