12.01.2012, 10:19
pawn Код:
new badwords[][] =
{
"Bitch",
"Whore",
"Fuck"
};
public OnPlayerText(playerid, text[])
{
for (new loop; loop < sizeof(badwords); loop ++)
{
new sfind = strfind(text, badwords[loop], true);
if(sfind == -1) continue;
while(text[sfind ] != 0 || text[sfind ] != ' ') text[sfind] = '*';
}
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
if(GetPVarInt(playerid, "Muted") == 1)
{
SendClientMessage(playerid,COLOR_RED, "You cant talk while on Class Selection");
return 0;
}
else if(GetPVarInt(playerid, "Muted") == 0)
{
format(text, 1024, "%s: {FFFFFF}[%d] {FFFFFF}%s", PlayerName, playerid, text);
SendClientMessageToAll(GetPlayerColor(playerid), text);
return 0;
}
return 1;
}