SA-MP Forums Archive
How to hide player text - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to hide player text (/showthread.php?tid=617764)



How to hide player text - HoangNam - 26.09.2016

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


Re: How to hide player text - SickAttack - 26.09.2016

Yeah, I'm sorry for your bad English too. I didn't understand a thing.


Re: How to hide player text - HoangNam - 26.09.2016

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
Yeah, I'm sorry for your bad English too. I didn't understand a thing.

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


Re: How to hide player text - SickAttack - 26.09.2016

Quote:
Originally Posted by HoangNam
Посмотреть сообщение

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


Re: How to hide player text - ChristolisTV - 26.09.2016

PHP код:
public OnPlayerText(playeridtext[])
{
     if(!
strcmp(pName"John"true))
     {
            return 
0;
     }
     return 
1;