OnPlayerText hmm
#1

How do I make anti swear, I mean I got to the OnPlayerText, but I dont get it how to get like GetPlayerText or something
Reply
#2

under onplayertext
pawn Код:
new antiswear[50];
if(strfind(antiswear, "Fuck", true) != -1 || strfind(antiswear, "Bitch", true) != -1)
{
     SendClientMessage(playerid,-1,"No swearing sir");
     return 0;
}
im not sure if it will work
Reply
#3

Thanks mate, really helpfull!
Reply
#4

rep me too please ++
Reply
#5

Yeah, will do but I didn't explain it good, uhm how do I make it like when you say like "Fuck" it will say "****"
Reply
#6

This might help you (By Ryder`):
http://forum.sa-mp.com/showpost.php?...postcount=1071
Reply
#7

Thanks!
Reply
#8

Quote:
Originally Posted by CyberGhost
Посмотреть сообщение
Should had thought of that earlier, good job cyberghost for helping him
Reply
#9

Yeah, but still that ain't helping me. :P
I am getting problem with
Quote:

replaceSwear(text, badWords[i]);

It says undefinied symbol :P

C:\Users\Maki\Desktop\server 0.3d\gamemodes\TankDM.pwn(154) : error 017: undefined symbol "replaceSwear"
C:\Users\Maki\Desktop\server 0.3d\gamemodes\TankDM.pwn(15 : error 010: invalid function or declaration
Reply
#10

pawn Код:
stock replaceSwear(string[], badWord[], replace = '*')
{
    new
        i
    ;
    while((i = strfind(string, badWord, true)) != -1)
    {
        for(new x = (i + strlen(badWord)); i != x; ++i)
        {
            string[i] = replace;
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)