How to add more?
#1

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?
Reply
#2

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

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.
Reply
#4

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)