Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
What do you mean by 'get their text'?
It's not currently possible to get the text that the player is typing in chat.
OnPlayerText is called when a player enters text without a /. You can find more information about OnPlayerText on the wiki. It has documentation for every function and callback and can be very useful for beginners.
Posts: 94
Threads: 29
Joined: Mar 2011
Reputation:
0
Well, I just wonder how can I make '****' for example, when player sends "fuck" for example.
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
You will need to put the code in OnPlayerText. There are already scripts out to do what you want to do, but if you want to know how to do it you need to use strfind, and use the value it returns to determine the position of the word, and use strdel to remove the word, and then use strins to enter the stars.
If you need any further help let me know, i'll explain more and maybe give you an example code. However, I recommend you take a look at the scripts that already exist. I believe Sandra made one.
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
Skylar, if someone says 'fuck you' it's not going to censor it - is it?
Posts: 2,027
Threads: 139
Joined: Jul 2010
Reputation:
0
You got two 'new string;' 's