How to replace a word
#5

Quote:
Originally Posted by (.Aztec);
View Post
pawn Code:
OnPlayerText(playerid, text[])
{
if(strcmp(text, "fuck", true) == 0) {
new string[128], playerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, playerName, sizeof(playerName));
format(string, sizeof(string), "%s: ****", playerName);
SendClientMessageToAll(YOURCHATCOLOR, string); }
return 1;
}
that works only if I just write fuck... but I want it to work if I write "fuck you", too, etc..
Reply


Messages In This Thread
How to replace a word - by Sascha - 16.08.2010, 17:31
Re: How to replace a word - by Slice - 16.08.2010, 17:34
Re: How to replace a word - by (.Aztec); - 16.08.2010, 17:44
Re: How to replace a word - by bigcomfycouch - 16.08.2010, 17:47
Re: How to replace a word - by Sascha - 16.08.2010, 17:50

Forum Jump:


Users browsing this thread: 2 Guest(s)