22.05.2010, 13:10
this is example code
stock AdvertisementCheck(string[])
{
if(!strfind(string,"www.",false))
{
return true;
}
return false;
}
public OnPlayerText(playerid, text[])
{
if(AdvertisementCheck(text))
{
PlayerInfo[playerid][pLocked] = 1;
Kick(playerid);
return 0;
}
when i said www. (Kicked)
when i said awww. (Not Kicked)
when i said (Space)www. (Not Kicked)
when i said aaaaawww. (not kicked)
when i said (Space)(Space) or (Space)(Space)(Space)www. (Not Kicked)
how to detect all word ?
stock AdvertisementCheck(string[])
{
if(!strfind(string,"www.",false))
{
return true;
}
return false;
}
public OnPlayerText(playerid, text[])
{
if(AdvertisementCheck(text))
{
PlayerInfo[playerid][pLocked] = 1;
Kick(playerid);
return 0;
}
when i said www. (Kicked)
when i said awww. (Not Kicked)
when i said (Space)www. (Not Kicked)
when i said aaaaawww. (not kicked)
when i said (Space)(Space) or (Space)(Space)(Space)www. (Not Kicked)
how to detect all word ?