24.03.2017, 13:54
I would do it like this:
Edit:
In your case:
Код:
if(strfind(text, "Fuck", true) != -1 || strfind(text, "Pussy", true) != -1 || strfind(text, "Asshole", true) != -1 || strfind(text, "Bitch", true) != -1 || strfind(text, "Madafakker", true) != -1|| strfind(text, "Motherfucker", true) != -1 || strfind(text, "fucker", true) != -1) { if(pInfo[playerid][Admin] < 1) { return SendClientMessage(playerid, error,"You are not allowed to use those words here."); }else return 0; }
In your case:
Код:
if(strfind(text,SwearWords[words],true) != -1 ) { if(pInfo[playerid][Admin] < 1) { return SendClientMessage(playerid, error,"You are not allowed to use those words here."); }else return 0; }