SA-MP Forums Archive
If any text contains - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: If any text contains (/showthread.php?tid=78610)



If any text contains - Blt950 - 21.05.2009

Hi, i just wonder that somone have the code for something like this:

If any text at chat contains the only words: fuck && sex then ...(my code)

Thanks for helpin


Re: If any text contains - NovaParadox - 21.05.2009

public OnPlayerText(playerid, text[])
{
if(strfind(text, "WORD HERE", true) != -1)
{
YOUR CODE HERE
}
return 1;
}


Re: If any text contains - ICECOLDKILLAK8 - 21.05.2009

Look for strfind in dutils or dudb