public OnPlayerText(playerid, text[])
{
if((strfind(text,"fuck",true,0))== 0){
new name[24];
new string[128];
GetPlayerName(playerid,name,24);
format(string, 256, "%s Is A Fool",name);
SendClientMessageToAll(COLOR_GREEN,string);
}
return 1;
}
Originally Posted by Serediucr
ok , this works , but if i say "fuck this server" doesn't works
|
public OnPlayerText(playerid, text[])
{
if((strfind(text,"fuck",true))== 0){
new name[24];
new string[128];
GetPlayerName(playerid,name,24);
format(string, 256, "%s Is A Fool",name);
SendClientMessageToAll(COLOR_GREEN,string);
}
return 1;
}
public OnPlayerText(playerid,text[])
{
if(strfind(text,"fuck",true)!=-1)
{
new name[MAX_PLAYER_NAME],
string[128];
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
format(string,sizeof(string),"%s Is A Fool.",name);
SendClientMessageToAll(COLOR_GREEN,string);
return 0;
}
// if you want the chat to be avaiable (the regular one of sa-mp) return it with 1.
return 0;
}
Originally Posted by MenaceX^
pawn Код:
|
new BadWords[][] =
{
"Fuck",
"Shit",
"Dick",
"Asshole"
};
for(new a; a<sizeof(BadWords); a++)
{
if(strfind(text, BadWords[a], true) != -1)
{
new name[MAX_PLAYER_NAME];
string[128];
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
format(string,sizeof(string),"%s Is A Fool.",name);
SendClientMessageToAll(COLOR_GREEN,string);
return 0;
}
}
public OnPlayerText(playerid,text[])
{
new string[128];
new BadWords[]=
{
"Fuck",
"Shit",
"Dick",
"Asshole"
};
if(strfind(text, BadWords, true) != -1)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
format(string,sizeof(string),"%s Is A Fool.",name);
SendClientMessageToAll(COLOR_GREEN,string);
return 0;
}
return 1;
}