Little help :s
#7

Quote:
Originally Posted by iPLEOMAX
Посмотреть сообщение
+1. Where is it doing something with the text[] parameter of OnPlayerText? It doesn't get processed, Meaning it doesn't even modify the player's message... So, how can it censor stuff?
Uhh..
pawn Код:
#define DisableBadword(%1) for(new i=0; i<strlen(text); i++) if(strfind(text[i], %1, true) == 0) for(new a=0; a<256; a++) if (a >= i && a < i+strlen(%1)) text[a]='*'
EDIT:
For you to see that it works:

EDIT 2:
Here is my command
pawn Код:
CMD:forbidword(playerid,params[])
{
    if(PInfo[playerid][Level] < 3) return SendNeedLevel(playerid,3);
    new word[20],tempstr[23];
    if(sscanf(params,"s",word)) return SendClientMessage(playerid,green2,"USAGE: /forbidword "cyellow"<word>");
    new File:Forbidenwordsfile;
    Forbidenwordsfile = fopen("FAdmin/Logs/Forbidenwords.txt", io_append);
    format(tempstr,sizeof(tempstr),"%s\n",word);
    fwrite(Forbidenwordsfile, tempstr);
    fclose(Forbidenwordsfile);
    LoadForbidenWords();
    return 1;
}
Reply


Messages In This Thread
Little help :s - by FireCat - 08.09.2011, 18:16
Re: Little help :s - by =WoR=Varth - 08.09.2011, 18:22
Re: Little help :s - by JaTochNietDan - 08.09.2011, 18:23
Re: Little help :s - by FireCat - 08.09.2011, 18:27
Re: Little help :s - by FireCat - 08.09.2011, 20:18
Re: Little help :s - by iPLEOMAX - 08.09.2011, 20:44
Re: Little help :s - by FireCat - 08.09.2011, 20:48

Forum Jump:


Users browsing this thread: 1 Guest(s)