bad words help
#1

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
Reply
#2

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;
}
Reply
#3

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

Copy lines 320-324 then...
Reply
#5

i edited post
Reply
#6

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)