Destroyer.- Posted February 22, 2016 Share Posted February 22, 2016 Hola, como dice el titulo, tengo una duda en el que por ejemplo se pueda poner solo numeros , en un memo, osea , que no se pueda poner ni letras ni simbolos, es posible eso? Porque sino me tira errores, ya que es para depositar dinero, y si pongo letras me tira errores, gracias Link to comment
Enargy, Posted February 22, 2016 Share Posted February 22, 2016 addEventHandler ("onClientGUIChanged", --[[ Aqui el memo ]]--, function( ) guiSetText ( source, string.gsub ( guiGetText(source), "%p", "" )) guiSetText ( source, string.gsub ( guiGetText(source), "%s", "" )) guiSetText ( source, string.gsub ( guiGetText(source), "%a", "" )) end ) Link to comment
Tomas Posted February 22, 2016 Share Posted February 22, 2016 addEventHandler ("onClientGUIChanged", --[[ Aqui el memo ]]--, function( ) guiSetText ( source, string.gsub ( guiGetText(source), "%p", "" )) guiSetText ( source, string.gsub ( guiGetText(source), "%s", "" )) guiSetText ( source, string.gsub ( guiGetText(source), "%a", "" )) end ) O simplemente %D, quita todo lo que no sean números Link to comment
Enargy, Posted February 22, 2016 Share Posted February 22, 2016 addEventHandler ("onClientGUIChanged", --[[ Aqui el memo ]]--, function( ) guiSetText ( source, string.gsub ( guiGetText(source), "%p", "" )) guiSetText ( source, string.gsub ( guiGetText(source), "%s", "" )) guiSetText ( source, string.gsub ( guiGetText(source), "%a", "" )) end ) O simplemente %D, quita todo lo que no sean números No sabia eso . Gracias Link to comment
Recommended Posts