OnPlayerText
#1

Hello, I'm trying to make an Forbidden Words System. I have this:

pawn Код:
public OnPlayerText(playerid, text[])
{
    new name[MAX_PLAYER_NAME];
    new string[128];
    GetPlayerName(playerid, name, sizeof(name));
    if(strfind("gay", "gay", true) != -1)
    {
        format(string, sizeof(string), "{FF0000}%s {15FF00}(%d) {FFFF00}: {FFCC33}Adaugati la favorite server-ul!", name, playerid);
        SendClientMessageToAll(-1, string);
    }
    return 1;
}
It's workin' fine, but, there's a way, if he say the word from strfind don't send it? And says too all players only text I put?
Reply
#2

Can you explain more please? I can't understand you probably
Reply
#3

If he write in chat the word from strfind, from pawn code, don't send it. Just send the format wich I writed up.
Reply
#4

Return 0.
Reply
#5

If you want to replace the word, like gay when someones says it, lets say it puts g**, then use something like this
http://pastebin.com/tdjZ1SUP, it's from my brother, it works perfectly, you could learn how to use it from here (Don't just copy and paste)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)