Jump to content

onPlayerChat


K4stic

Recommended Posts

Posted

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

Posted

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

Posted
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...