Saying "Hacker" in chat dont work
#1

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

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

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

Please an example?
Reply
#4

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

Yeah i already got it now but thanks.
Reply
#6

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) {
Reply
#7

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)
    {
Reply
#8

ok thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)