K4stic Posted February 8, 2014 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 Giving a Fuck? Nope, That isn't in My Skill Set
Bonsai Posted February 8, 2014 Posted February 8, 2014 First you remove all spaces, then you check the string length, if its 0 you use cancelEvent()
K4stic Posted February 9, 2014 Author 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 Giving a Fuck? Nope, That isn't in My Skill Set
myonlake Posted February 9, 2014 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. If I helped you, please click the like button on the right Thanks!
K4stic Posted February 9, 2014 Author 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 Giving a Fuck? Nope, That isn't in My Skill Set
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