How to add more? - 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)
+--- Thread: How to add more? (
/showthread.php?tid=413819)
How to add more? -
RiChArD_A - 06.02.2013
Hi, I have this on my server:
pawn Код:
public OnPlayerText(playerid, text[])
{
if(strfind(text, "word", true) != -1) return Kick(playerid);
return 1;
}
But how can I add more words ti it?
Re: How to add more? -
Jeffry - 06.02.2013
pawn Код:
public OnPlayerText(playerid, text[])
{
if(strfind(text, "word", true) != -1) return Kick(playerid);
if(strfind(text, "word2", true) != -1) return Kick(playerid);
if(strfind(text, "word3", true) != -1) return Kick(playerid);
return 1;
}
Re: How to add more? -
u3ber - 06.02.2013
Quote:
Originally Posted by Jeffry
pawn Код:
public OnPlayerText(playerid, text[]) { if(strfind(text, "word", true) != -1) return Kick(playerid); if(strfind(text, "word2", true) != -1) return Kick(playerid); if(strfind(text, "word3", true) != -1) return Kick(playerid); return 1; }
|
or...logical OR or array of words.
Respuesta: Re: How to add more? -
RiChArD_A - 06.02.2013
Quote:
Originally Posted by Jeffry
pawn Код:
public OnPlayerText(playerid, text[]) { if(strfind(text, "word", true) != -1) return Kick(playerid); if(strfind(text, "word2", true) != -1) return Kick(playerid); if(strfind(text, "word3", true) != -1) return Kick(playerid); return 1; }
|
mmm tried that before and did't work, but I tried it again and is working. mm :Interesting:
PD: Thanks dude! +rep