How Can I make anti MG - 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 Can I make anti MG (
/showthread.php?tid=617252)
How Can I make anti MG -
thienle7090 - 18.09.2016
like the title i want make anti MG ( Metal Gamming ) like this:
-a : hello b
-b : hello a @@
when the message have any Special Characters that send A message " Messages can not send or / b to avoid MG"
I can make a list with special characters
Re: How Can I make anti MG -
K0P - 18.09.2016
Don't know if it really works but you can still test it.
Код:
new Symbols [] = //You can add more symbols in this array
{
"@",
"$"
};
public OnPlayerText(playerid, text[])
{
for(new i = 0; i < sizeof(Symbols); i++)
{
if(strfind(text, Symbols[i], true) != -1)
{
SendClientMessage(playerid, 0xFFFFFFFF, "> You message here <");
return 0;
}
}
return 1;
}
Re: How Can I make anti MG -
thienle7090 - 18.09.2016
Quote:
Originally Posted by K0P
Don't know if it really works but you can still test it.
Код:
new Symbols [] = //You can add more symbols in this array
{
"@",
"$"
};
public OnPlayerText(playerid, text[])
{
for(new i = 0; i < sizeof(Symbols); i++)
{
if(strfind(text, Symbols[i], true) != -1)
{
SendClientMessage(playerid, 0xFFFFFFFF, "> You message here <");
return 0;
}
}
return 1;
}
|
thanks
Re: How Can I make anti MG -
thienle7090 - 18.09.2016
"@",
"$" what mean ,
Re: How Can I make anti MG -
K0P - 18.09.2016
Quote:
Originally Posted by thienle7090
"@",
"$" what mean ,
|
It means that if you type any of these symbols in the chat,it will show the error message