21.01.2017, 09:14
(
Последний раз редактировалось DetoNater; 21.01.2017 в 09:48.
)
@ luicy i've tried that, i have problem with my function help me with that...
after luicy's suggestion
Код:
antiswear(text[]) { { new chatswear,len; for(new cs = 0; cs < MAX_WORDS; cs++) { //check if the word is offensive chatswear = strfind(text, swear[cs], true); if(chatswear > -1) { len = strlen(swear[cs]); if(len < 3) break; for(new y = 1; y < len; y++) { text[y] = '*'; //chatswear+y } } } } return 0; }
Код:
if(text[0] == '@') { new string[128]; format(string, sizeof(string), "BF_CHAT %s [%d]: %s", PlayerName(playerid),playerid,antiswear(text[1])); SendClientMessage(playerid,0xFF8C00FF,string); }