Simple question and help needed
#4

I would do it like this:
Код:
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;  
    }
Edit:

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


Messages In This Thread
Simple question and help needed - by 1fret - 24.03.2017, 03:52
Re: Simple question and help needed - by AndySedeyn - 24.03.2017, 04:02
Re: Simple question and help needed - by SyS - 24.03.2017, 04:45
Re: Simple question and help needed - by jasperschellekens - 24.03.2017, 13:54

Forum Jump:


Users browsing this thread: 1 Guest(s)