Jump to content

Editfield.


Jekorgi

Recommended Posts

You have another way to use a resource like.

Only use this :

function onDeleteCharacter() 
    if editBoxState == true then 
        textEdited = string.sub(textEdited,1,string.len(textEdited)-1) 
    end 
end 
bindKey("backspace", "down", onDeleteCharacter) 
function onEditCharacter(character) 
    if editBoxState == true then 
        local count =  string.len(textEdited) 
        if count < 23 then 
            textEdited = textEdited..character 
        end 
    end 
end 
addEventHandler("onClientCharacter", getRootElement(), onEditCharacter) 

Its just an exemple then in ur render function just put your dxDrawText(textEdited,x,y,w,h,tocolor(255,255,255,255)...)

Its will take less memory and less download for players :D

Link to comment
You have another way to use a resource like.

Only use this :

function onDeleteCharacter() 
    if editBoxState == true then 
        textEdited = string.sub(textEdited,1,string.len(textEdited)-1) 
    end 
end 
bindKey("backspace", "down", onDeleteCharacter) 
function onEditCharacter(character) 
    if editBoxState == true then 
        local count =  string.len(textEdited) 
        if count < 23 then 
            textEdited = textEdited..character 
        end 
    end 
end 
addEventHandler("onClientCharacter", getRootElement(), onEditCharacter) 

Its just an exemple then in ur render function just put your dxDrawText(textEdited,x,y,w,h,tocolor(255,255,255,255)...)

Its will take less memory and less download for players :D

You can complete example? please ;)

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...