Help strfind
#1

Help i have this code
pawn Код:
public OnPlayerText(playerid, text[])
{
    if(strfind(text, "jedi govna", true) !=-1 && strfind(text, "mrs", true) !=-1 && strfind(text, "jebem ti mater", true)!=-1)
    {
        SendClientMessage(playerid, -1, ""SVETLOSMEDJA"[CL:RP]: "BELA"(( Budi dobar decko i ne govori proste reci! ))");
        return 0;
    }
    return 1;
}
It should prevent the player saving this bad words, it worked with "**** *****" then i added "***" and "***** ** *****" and its only works now with the last one (CENSORED!).
Reply
#2

Try this.
pawn Код:
public OnPlayerText(playerid, text[])
{
    if(strfind(text, "jedi govna", true) !=-1 || strfind(text, "mrs", true) !=-1 || strfind(text, "jebem ti mater", true)!=-1)
    {
        SendClientMessage(playerid, -1, ""SVETLOSMEDJA"[CL:RP]: "BELA"(( Budi dobar decko i ne govori proste reci! ))");
        return 0;
    }
    return 1;
}
Reply
#3

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)