Badword Sys need help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Badword Sys need help (
/showthread.php?tid=165840)
Badword Sys need help -
Schnacke - 06.08.2010
(Sry for bad English!)
![Shocked](images/smilies/surprised.gif)
I want to create a dynamic Badword system
the command I'm ready now:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128];
new tmp[128];
new idx;
cmd = strtok(cmdtext,idx);
if(strcmp(cmd,"/add",true)==0)
{
new wString[64];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SMC(playerid,FARBE_WEIЯ,"Benutze /add [badwort]");
new File:bwFile=fopen("bw.ini",io_append);
fwrite(bwFile, tmp);
fclose(bwFile);
format(wString,sizeof(wString),"Du hast das Wort %s, in die Badword liste hinzugefьgt!",tmp);
SMC(playerid,FARBE_WEIЯ,wString);
return 1;
}
return 1;
}
I can now add badwords to the bw.ini
Now is my problem OnPlayerText.
How do I check the rates (words) of the player with the bw.ini?
So that if someone using a word which exists in the bw.ini to get such a kick?
Thx