A7M8D Posted July 24, 2017 Share Posted July 24, 2017 السلام عليكم .. هل اقدر احط في ايديت ارقام بس و اذا غير ارقام يكنسل الكتابة لان جربت فكرة جدول في الحروف بس ممكن الشخص يكتب رموز مش هكتب كل الرموز اكيد في حل افضل ؟ Link to comment
Abdul KariM Posted July 24, 2017 Share Posted July 24, 2017 (edited) "onClientGUIChanged" guiGetText guiSetText Edited July 24, 2017 by Abdul KariM 1 Link to comment
A7M8D Posted July 24, 2017 Author Share Posted July 24, 2017 (edited) في مشكلة لما اكتب 1 تمام اكتب 2 لا local NumbersTable = { "1", "2" } addEventHandler ( "onClientGUIChanged", Eda3Edit, function ( ) for i,v in ipairs ( NumbersTable ) do local EditG = guiGetText (Eda3Edit) if string.find ( EditG, v ) then return else guiSetText(Eda3Edit,"") end end end ) Edited July 24, 2017 by #MR.NaiF Link to comment
Adham Posted July 24, 2017 Share Posted July 24, 2017 (edited) addEventHandler("onClientGUIChanged", root, function( ) if source == GUIEditor.edit[3] then if not tonumber(guiGetText(source)) then guiSetText(source, "") end end end ) Edited July 24, 2017 by Deativated Link to comment
Abdul KariM Posted July 24, 2017 Share Posted July 24, 2017 addEventHandler ( "onClientGUIChanged" , YourEdit , function ( ) local TheText = guiGetText ( source ) if ( not tonumber ( TheText ) ) then guiSetText( source, TheText:sub( 1, #TheText-1 ) ) end end ) الطريقة الي فوق راح تحذف كل شي بالايدت مجرد كتابة اي حرف اما طريقتي حتى لو كتب احرف وفيه ارقام بالايدت راح يمنعه من كتابة الاحرف فقط 3 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now