Tonyx97 Posted November 5, 2012 Posted November 5, 2012 Hola a todos, tengo una duda simple pero que no se -.- como se supone que debo poner un GUIEdit para que solo se puedan escribir numeros, SOLO NUMEROS, gracias por leer.
JuanM27 Posted November 5, 2012 Posted November 5, 2012 agregas una funcion... function aClientEditChanged () if ( guiGetText ( editBox ) ~= "" ) then --editBox es la caja de Texto. local input = tonumber ( guiGetText ( editBox ) ) if ( not input ) then guiSetText ( editBox, string.gsub ( guiGetText ( editBox ), "[^%d]", "" ) ) elseif ( input > 9999 ) then guiSetText ( editBox, "9999" ) elseif ( input < 0 ) then guiSetText ( editBox, "0" ) end end return end y agregas el evento.. ejemplo addEventHandler ( "onClientGUIChanged", theWindow, aClientEditChanged ) el evento lo puedes poner en el menushow por ejemplo.... etc.
Recommended Posts