K4stic Posted February 8, 2014 Share Posted February 8, 2014 How i can Dissable spaces i mean if player just do /say " " <= Just spaces without Text to that massage no appear i know that if i use gsub "%s+" They will remove all Spaces but i need to message no appear only if player saying something for spam or any other think that he have on head to spam with spaces Link to comment
Bonsai Posted February 8, 2014 Share Posted February 8, 2014 First you remove all spaces, then you check the string length, if its 0 you use cancelEvent() Link to comment
K4stic Posted February 9, 2014 Author Share Posted February 9, 2014 That wasen't Help me as the First part of Code is addEventHandler ( "onPlayerChat", root, function ( message, messageType ) cancelEvent ( ) if ( message == "" or message == " " ) then return end end ) Anyway i find it and solve it Link to comment
myonlake Posted February 9, 2014 Share Posted February 9, 2014 Like Bonsai said, remove all spaces before you perform a string length check. That way you will know the real length of the message. Link to comment
K4stic Posted February 9, 2014 Author Share Posted February 9, 2014 Like Bonsai said, remove all spaces before you perform a string length check. That way you will know the real length of the message. Anyone Read Messages Full? i said: Anyway i find it and solve it 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