Help - 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: Help (
/showthread.php?tid=596305)
Help - Godly - 15.12.2015
I wanted to make a system in pawn.What is it?Well we all know that players keep shouting hacker in main chat over, and over..so i want a system that can prevent players from saying "hacker" and some bad words.I saw that system in some server and it was pretty awesome.
Example: Players types "hacker", System: That is an Invalid or bad word.
But since i am still new to the scripting, does anyone know how to make that.If someone knows send the code in the replies, Thanks!
Re: Help -
SnG.Scot_MisCuDI - 15.12.2015
Here are some links, and you are on your way to knowledge
https://sampwiki.blast.hk/wiki/OnPlayerText
https://sampforum.blast.hk/showthread.php?tid=335123
Re: Help -
Vince - 15.12.2015
PHP код:
static const cBadWords[][] = {"hacker", "cheater" /*, ... */};
for(new i; i < sizeof(cBadWords); i++)
{
if(strfind(text, cBadWords[i], true))
{
// bad word
return 0; // or break if you still want to handle some more code
}
}
Simple example.
Re: Help - Godly - 15.12.2015
Thanks guys.