SA-MP Forums Archive
bad words help - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: bad words help (/showthread.php?tid=124561)



bad words help - ~Dangun! - 30.01.2010

i am using this:
pawn Код:
if(!strcmp("fucker",text,true) || !strcmp("gay",text,true) || !strcmp("fucku",text,true))
        {
    format(string, sizeof(string),"%s(%d): I feeell so good! I h8 badwords!", pInfo[playerid][name],playerid);
    SendClientMessageToAll(GetPlayerColor(playerid),text);
        return 0;
        }
But when i type fucker it says in chat: fucker i don't see the problem


Re: bad words help - LuxurioN™ - 30.01.2010

Try this:

pawn Код:
if(!strcmp("fucker",text,true) || !strcmp("gay",text,true) || !strcmp("fucku",text,true))
{
format(string, sizeof(string),"%s(%d): I feeell so good! I h8 badwords!", pInfo[playerid][name],playerid);
SendClientMessageToAll(GetPlayerColor(playerid),string);
return 0;
}



Re: bad words help - ~Dangun! - 30.01.2010

Код:
(320) : error 010: invalid function or declaration
(324) : error 010: invalid function or declaration
1st line = error
and last line = error


Re: bad words help - ray187 - 30.01.2010

Copy lines 320-324 then...


Re: bad words help - ~Dangun! - 30.01.2010

i edited post


Re: bad words help - LuxurioN™ - 30.01.2010

Not exists anyone errors in this code.

pawn Код:
if(!strcmp("fucker",text,true) || !strcmp("gay",text,true) || !strcmp("fucku",text,true))
{
format(string, sizeof(string),"%s(%d): I feeell so good! I h8 badwords!", pInfo[playerid][name],playerid);
SendClientMessageToAll(GetPlayerColor(playerid),string);
return 0;
}
Look how would in OnPlayerText:

pawn Код:
public OnPlayerText(playerid, text[])
{
if(!strcmp("fucker",text,true) || !strcmp("gay",text,true) || !strcmp("fucku",text,true))
{
new string[128];
format(string, sizeof(string),"%s(%d): I feeell so good! I h8 badwords!", pInfo[playerid][name],playerid);
SendClientMessageToAll(GetPlayerColor(playerid),string);
return 0;
}
return 1;
}