Posts: 168
Threads: 43
Joined: Jul 2010
Reputation:
0
Someone knows how to block some language on OnPlayerText?
So someone will not talk Spanish on chat.
Posts: 1,466
Threads: 7
Joined: Jun 2009
Reputation:
0
Return 0 to prevent it from appearing in chat.
Posts: 216
Threads: 5
Joined: Jan 2011
Reputation:
0
You can't really block a whole language but you can block characters.
Posts: 2,896
Threads: 11
Joined: Sep 2008
Reputation:
0
You would need to actually check the text that is passed to OnPlayerText and see if it contains Spanish words or symbols. If it does, you can return 0, as Retardedwolf said, to prevent the text from being sent.
Unless you want to write an array of all the Spanish words, then just check for a few common ones or Spanish symbols (for example, n with tilt symbol). Besides that, I cannot think of another way of preventing it. It may have gotten past me here at 2AM, however.
Posts: 168
Threads: 43
Joined: Jul 2010
Reputation:
0
Look what I tried to do :
if(text[45] == "§") return SendClientMessage(playerid,WHITE,"You can't use this language");
§ is only for example
Now I tried to type something and it just writes the text to all of the server(Global), It's a RP server..
Posts: 168
Threads: 43
Joined: Jul 2010
Reputation:
0
Its still fucking up my OnPlayerText :[