24.08.2014, 14:54
Please , explain me how can i do to check if the player inputtext is : ADM , HLP , VIP , SYMBOLS (!@#$@%)
?
?
static const arrWords[][] =
{
"FirstWord",
"SecondWord"
};
......
for(new i = 0; i < sizeof(arrWords); i++)
{
if(strfind(inputtext, arrWords[i], true) != -1)
{
// you found the word at index 'i'
}
}
...
new i = 0, str[10]; // adjust to your needs
while (str[i] != '\0')
{
if (str[i] == '!' || str[i] == '?' || str[i] == '@' || str[i] == '#' || str[i] == '&' || str[i] == '%' || str[i] == '$')
// string contains invalid symbol
// check for clan names
if (str[i] == 'A' && str[i+1] == 'D' && str[i+2] == 'M')
// 'ADM' tag
// etc.
i++;
}