Jump to content

[Help] Edit


Stranger

Recommended Posts

hello guys

i have a little problem in this code :

timeee[localPlayer] = setTimer(function () 
local gWA22 = guiGetText (GUIEditor_Edit[1]) 
    if gWA22 == '-' then 
        guiSetText (GUIEditor_Edit[1],"") 
    end 
local gWA22 = guiGetText (GUIEditor_Edit[2]) 
    if gWA22 == '-' then 
        guiSetText (GUIEditor_Edit[2],"") 
    end 
local gWA22 = guiGetText (GUIEditor_Edit[3]) 
    if gWA22 == '-' then 
        guiSetText (GUIEditor_Edit[3],"") 
    end 
local gWA22 = guiGetText (GUIEditor_Edit[4]) 
    if gWA22 == '-' then 
        guiSetText (GUIEditor_Edit[4],"") 
    end 
local gWA22 = guiGetText (GUIEditor_Edit[5]) 
    if gWA22 == '-' then 
        guiSetText (GUIEditor_Edit[5],"") 
    end 
local gWA22 = guiGetText (GUIEditor_Edit[6]) 
    if gWA22 == '-' then 
        guiSetText (GUIEditor_Edit[6],"") 
    end 
local gWA22 = guiGetText (GUIEditor_Edit[7]) 
    if gWA22 == '-' then 
        guiSetText (GUIEditor_Edit[7],"") 
    end 
local gWA22 = guiGetText (GUIEditor_Edit[8]) 
    if gWA22 == '-' then 
        guiSetText (GUIEditor_Edit[8],"") 
    end 
local gWA22 = guiGetText (GUIEditor_Edit[9]) 
    if gWA22 == '-' then 
        guiSetText (GUIEditor_Edit[9],"") 
    end 
local gWA22 = guiGetText (GUIEditor_Edit[10]) 
    if gWA22 == '-' then 
        guiSetText (GUIEditor_Edit[10],"") 
    end 
local gWA22 = guiGetText (GUIEditor_Edit[11]) 
    if gWA22 == '-' then 
        guiSetText (GUIEditor_Edit[11],"") 
    end  
local gWA22 = guiGetText (GUIEditor_Edit[12]) 
    if gWA22 == '-' then 
        guiSetText (GUIEditor_Edit[12],"") 
    end 
local gWA22 = guiGetText (GUIEditor_Edit[13]) 
    if gWA22 == '-' then 
        guiSetText (GUIEditor_Edit[13],"") 
    end 
local gWA22 = guiGetText (GUIEditor_Edit[14]) 
    if gWA22 == '-' or gWA22 == '1-' then 
        guiSetText (GUIEditor_Edit[14],"") 
    end 
local gWA22 = guiGetText (GUIEditor_Edit[15]) 
    if gWA22 == '-' then 
        guiSetText (GUIEditor_Edit[15],"") 
    end 
end, 50, 0 ) 

it work fin but when i wrote "-" return to " " and this is good, but there is a problem :

when i wroted like that "11-11" and remove 11 like this "-11" the "-" should be removed, but no

and i want it like this :

i can't wrote any thing only 'noumber'

and i want it when i wroted like this "11-" return to " "

help please

and thank you .

Link to comment
addEventHandler('onClientGUIChanged',root, 
    function (  Element ) 
      for k = 1,15 do 
        if source == GUIEditor_Edit[k] then 
          if not tonumber ( guiGetText ( source ) ) then  
            return  
              guiSetText ( source,'' ) 
            end 
        end 
    end 
end 
) 

I guess this is what you want.

Edited by Guest
Link to comment

there is another problem, when i copy this "-55" or " gg"

i can past it in the edit, i don't want it like this, is there anyway, to fix it ?

i want it when i copy this "-1" and past it then return to "1"

do you know what i mean ?

i mean if i past it, if there any "-" or "abc" then remove it and leave the number after the "-"

help please .

Link to comment

can you tell me what is wrong in this code :

addEventHandler('onClientGUIChanged',root, 
   for k = 1,15 do 
    if source == GUIEditor_Edit[k] then 
      local text = guiGetText(GUIEditor_Edit[k]) 
         if text:find('-') then 
            guiSetText(GUIEditor_Edit[k],math.abs(text)) 
           end 
       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...