Jump to content

guiedit issue.


Recommended Posts

i see many of scripts on different of servers like when i type on edit and press enter not needed to click on a button to send my message just press enter

so ..

if ( source == sendmytext ) then 

sendmytext is a button ..

so if i want also make it send a text with "enter key"

should i do like that?

if ( source == sendmytext or bindkey("enter_exit",down,myfunc ) then -- i know it's wrong but i just guess[ 

or like that

if ( source == sendmytext ) then 
if ( source == enter_exit ) -- i know it's wrong but i just guess 

here's the code

function furbo(state) 
    if state == "left" then 
       if ( source == sendmytext  ) then 
           local Player = getLocalPlayer() 
           local thetext = guiGetText(myedit) 
           if thetext ~= "" then 
           triggerServerEvent("SendTexetes", getLocalPlayer(), Player, thetext) 
           guiSetText(myedit, "") 
           else 
           outputChatBox("cannot send.", 255, 0, 0 ) 
             
                end 
            end 
        end 
    end 
addEventHandler("onClientGUIClick", getRootElement(), furbo) 

:idea::idea: how ? and is it tall issue.

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