Jump to content

How to find a non ASCII char?


knash94

Recommended Posts

Posted

Hey.

So im fed up of people speaking arabic in my server all the time. and i want to know whats the way to find if the spoken character is ASCII .. Gettok didnt work with me neither.

Posted

This may be what you're looking for:

function onChat( message, messageType )
cancelEvent()
if not isPlayerMuted(source) then
       message = string.gsub(message, "[^ -~]", "")
outputChatBox(message, getRootElement(), 0, 0, 0, true)
end
end
 
addEventHandler( "onPlayerChat", getRootElement(), onChat )

It's not tested though.

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...