[FilterScript] Anti /q joke script - 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: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Anti /q joke script (
/showthread.php?tid=452125)
Anti /q joke script -
Titanic4 - 20.07.2013
Are you tired of /q jokers? They're really annoying, since /q exists some players decides to type into main chat something like "Type /q to be god". I came with a solution of the problem. The anti /q joke filterscript filters the jokers from normal players. It detects simple attempt to bypass by inserting space between / and q.
Demo of default, commented in source code function(in Polish, but you should get the point):
[ame]http://www.youtube.com/watch?v=67ukfIeF5ME[/ame]
Getting it to work:
Before compiling open pwn source code in pawno(or whatever you're using for making pwn files), go to line 41 or 42 and replace the comment on that line with whatever you want for punishing the /q joker(using either native functions or gamemode functions)
Download:
Click here
Disclaimer: As filterscript user you're approved to use fragments of the pwn file in your own filterscripts and to improve the original code as you wish as long as you give the credit to author.
Re: Anti /q joke script -
ReV. - 20.07.2013
Just requires a simple line under OnPlayerText, dunno what all that extra stuff is for.
Код:
if(strfind(text, "/q", true) != -1) return 0;
Re: Anti /q joke script -
Titanic4 - 20.07.2013
Quote:
Originally Posted by [Hunter]
Just requires a simple line under OnPlayerText, dunno what all that extra stuff is for.
Код:
if(strfind(text, "/q", true) != -1) return 0;
|
Код:
if(strfind(text, "/q", true) != -1) return 0;
If that line would be alone, non-jokers who wants to know what's /q would be kicked too(in my LAN testing), that's why extra stuff is in the script. The jokers will also attempt to bypass the protection by putting space between "/" and "q".