15.12.2017, 11:57
anyway to optimise this
+ rep for helper
PHP код:
if(ServerInfo[AntiSwear] == 1 && PlayerInfo[playerid][Level] < MAX_ADMIN_LEVEL)
{
new pos;
for(new s; s < ForbiddenWordCount; s++)
{
while((pos = strfind(text,ForbiddenWords[s],true)) != -1)
{
for(new i = pos, j = pos + strlen(ForbiddenWords[s]); i < j; i++) text[i] = '*';
}
}