Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //-------------------------------------------------------------------------//
- /*
- _______ _______ _ _______ _______ _______
- ( ____ \( ____ \( ( /|( ____ \( ___ )( ____ )
- | ( \/| ( \/| \ ( || ( \/| ( ) || ( )|
- | | | (__ | \ | || (_____ | | | || (____)|
- | | | __) | (\ \) |(_____ )| | | || __)
- | | | ( | | \ | ) || | | || (\ (
- | (____/\| (____/\| ) \ |/\____) || (___) || ) \ \__
- (_______/(_______/|/ )_)\_______)(_______)|/ \__/
- by AzkarGames/SolidZone (The same guy, but 2 different names)
- Terms of use:
- You may edit this filterscript and publish it again,
- but you should at least keep the original credits in here.
- In case you delete the credits, the punishment would be
- bad conscience.
- This isn't the final version, so bugs may appear.
- I'm trying to update this system as often as I change it.
- */
- //-------------------------------------------------------------------------//
- #include <a_samp>
- #define COLOR_CENSOR 0xFFFF00FF
- new ins_words[][] =
- {
- "whore","sucker","fucker","wixxer","wanker","fuck","suck","dickhead","cock",
- "bitch","schlampe","nutte","arschloch","hurensohn","cunt","fotze","schwanzkopf",
- "jizz","missgeburt","mistgeburt","scheisse","scheiße","scheisshaufen","scheißhaufen",
- "analritter","schwuchtel","fag"
- };
- public OnFilterScriptInit()
- {
- print("\n-----------------------------------------------");
- print("Censorship-Filterscript by SolidZone/AzkarGames");
- print("-----------------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- new ret = true;
- new rsrwords = 0;
- new idx;
- while(rsrwords < strlnmb(text,' ') + 1)
- {
- if(insult(strtok(text,idx)))
- {
- SendClientMessage(playerid,COLOR_CENSOR,"[CS-System]: You shouldn't say that to someone!");
- ret = false;
- }
- rsrwords++;
- }
- return ret;
- }
- stock insult(string[])
- {
- new rins = false;
- for(new i = 0; i < sizeof(ins_words);i++)
- {
- if(strfind(string,ins_words[i],true) != -1)
- {
- new nmblbins = strfind(string,ins_words[i],true);
- new offs = nmblbins + strlen(ins_words[i]);
- new lbins[20];
- strmid(lbins,string,0,nmblbins);
- new lains[20];
- strmid(lains,string,offs,strlen(string));
- new nmblains = strlen(lains);
- if(nmblbins < 3 && nmblains < 3)
- {
- rins = true;
- break;
- }
- if(strlnmb(lains,ins_words[i][strlen(ins_words[i])]) > 1 || strlnmb(lbins,ins_words[i][0]) > 1)
- {
- rins = true;
- break;
- }
- }
- }
- return rins;
- }
- stock strlnmb(string[],letter)
- {
- new length = strlen(string);
- new foundletter;
- for(new i = 0; i < length; i++)
- {
- if(string[i] == letter) foundletter++;
- }
- return foundletter;
- }
- strtok(const string[], &index)
- {
- new length = strlen(string);
- while ((index < length) && (string[index] <= ' '))
- {
- index++;
- }
- new offset = index;
- new result[30];
- while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
- {
- result[index - offset] = string[index];
- index++;
- }
- result[index - offset] = EOS;
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement