An a Little fix for UTF-8 symbols.
We have that stock in source -
Code:
stock FilterWord(String:word[], maxlength)
{
new String:sFilter[128];
for (new x = 0; x < strlen(word); x++)
{
decl String:sBuffer[128];
strcopy(sBuffer, sizeof(sBuffer), sFilter);
Format(sFilter, sizeof(sFilter), "%s%s", CHAR_FILTER, sBuffer);
}
strcopy(word, maxlength, sFilter);
}
If we try to replace word with utf-8 - he couts double. (example: word "биба" replaces as ********)
Fixed code -
Code:
stock FilterWord(String:word[], maxlength)
{
new String:sFilter[128];
for (new x = 0; x < strlen(word); x++)
{
decl String:sBuffer[128];
strcopy(sBuffer, sizeof(sBuffer), sFilter);
Format(sFilter, sizeof(sFilter), "%s%s", CHAR_FILTER, sBuffer);
if (IsCharMB(word[x]) > 1) x++;
}
strcopy(word, maxlength, sFilter);
}
__________________