SA-MP Forums Archive
Saying "Hacker" in chat dont work - 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: Saying "Hacker" in chat dont work (/showthread.php?tid=526711)



Saying "Hacker" in chat dont work - Blackazur - 18.07.2014

Hello, how can i make it that saying "Hacker" in chat dont work and a message come like "Use /report instead!"?


Re: Saying "Hacker" in chat dont work - Hanger - 19.07.2014

https://sampwiki.blast.hk/wiki/Strfind

https://sampwiki.blast.hk/wiki/OnPlayerText
return 0;


AW: Saying "Hacker" in chat dont work - Blackazur - 19.07.2014

Please an example?


Re: Saying "Hacker" in chat dont work - Juvanii - 19.07.2014

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(strfind(text, "Hacker", true) != -1)
    {
        SendClientMessage(playerid, -1, "/report id");
        return 0;
    }
    return 1;
}



AW: Saying "Hacker" in chat dont work - Blackazur - 19.07.2014

Yeah i already got it now but thanks.


AW: Saying "Hacker" in chat dont work - Blackazur - 19.07.2014

There are errors because input line too long how to fix?

Код:
	if(strfind(text, "hacker", true) != -1 || strfind(text, "cheater", true) != -1 || strfind(text, "hack", true) != -1 || strfind(text, "cheat", true) != -1 || strfind(text, "hacka", true) != -1 || strfind(text, "cheata", true) != -1 || strfind(text, "hackzor", true) != -1 || strfind(text, "trollbeit", true) != -1 || strfind(text, "s0nictz", true) != -1 strfind(text, "hacka", true) != -1 || strfind(text, "cheata", true) != -1 || strfind(text, "hackzor", true) != -1 || strfind(text, "******", true) != -1 || strfind(text, "******", true) != -1 || strfind(text, "rapidfire", true) != -1 || strfind(text, "rapid fire", true) != -1 || strfind(text, "hacka", true) != -1) {



Re: Saying "Hacker" in chat dont work - Jefff - 19.07.2014

You don't need too many words if you put "hack" it works also for hacker chacker hacka and more
Top
pawn Код:
new BadWords[][] =
{
    !"hack",
    !"cheat",
    !"trollbeit",
    !"s0nictz",
    !"rapid"
};
OnPlayerText
pawn Код:
for(new i = 0; i != sizeof(BadWords); i++)
    if(strfind(text, BadWords[i], true) != -1)
    {



AW: Saying "Hacker" in chat dont work - Blackazur - 19.07.2014

ok thanks.