PDA

View Full Version : How to hide player text


HoangNam
26/09/2016, 04:44 AM
When player says 'My name is Nam' , it will hide player's text. And how to check Strfind in some sentences. Every sentences has 'Dog' player's text will be hide. Sorry for my bad English

SickAttack
26/09/2016, 04:50 AM
Yeah, I'm sorry for your bad English too. I didn't understand a thing.

HoangNam
26/09/2016, 04:57 AM
Yeah, I'm sorry for your bad English too. I didn't understand a thing.
:D
Example :
Johnson: My name is Johnson
When Johnson said My name is Johnson, in this sentence, there is 'name'. AAAAAAz
Any sentences has 'name', script will hide this sentence. Do you understand??

SickAttack
26/09/2016, 05:07 AM
:D
Example :
Johnson: My name is Johnson
When Johnson said My name is Johnson, in this sentence, there is 'name'. AAAAAAz
Any sentences has 'name', script will hide this sentence. Do you understand??

This section isn't for requests.

1. Get player's name
2. Use strfind and check if the player's name is in a string
3. Return 0 in OnPlayerText to prevent the message from being sent

ChristolisTV
26/09/2016, 01:08 PM
public OnPlayerText(playerid, text[])
{
if(!strcmp(pName, "John", true))
{
return 0;
}
return 1;
}