Raised This Month: $32 Target: $400
 8% 

[Any] Super Targeting (Filters) |Updated 2/25/16|


Post New Thread Reply   
 
Thread Tools Display Modes
404UserNotFound
BANNED
Join Date: Dec 2011
Old 08-26-2016 , 22:59   Re: [Any] Super Targeting (Filters) |Updated 2/25/16|
Reply With Quote #21

Quote:
Originally Posted by Mitchell View Post
Yeah, enums are no longer supported in the new syntax, however this should just be converted to a Trie/Array
the trie can be used to lookup the index which holds all the information within the enum (which can be converted into arrays)

I actually went ahead and tried to convert the dev branch to the new syntax:
https://bitbucket.org/MitchDizzle/su...90358f/?at=1-7
Oh beauty, eh. I've been meddling with the code for your plugin for a day and a half now trying to figure out how best to do the conversion from an enum to something for new syntax.

I'll check out the dev branch.

EDIT: Lookin' good. And you used the new methodmap setup for the arraylist and stringmap stuff, very nice. I like that. I do see there is still some code that needs to be converted over to new syntax, so I've begun taking care of that myself.

And boom, finally done. Fully updated the plugin along with the updater.inc file to new syntax. Keep in mind that I haven't actually tested the plugin ingame to make sure it has retained 100% functionality through the conversion. So what I did was I made two versions. "commandfilters_withcomments.sp" contains all the old syntax lines that I converted, commented out above the new syntax versions that I did. "commandfilters_without.sp" contains none of the old syntax code comments.

(and I did this entire conversion all by myself without getting help from Pelipoika or redwerewolf even figured out that tricky-ass "view_as<TFCond>(fltCond[k])" bit on my own)

EDIT: Crap in a hat, somehow, the 3 lines in the plugin that use "hClients" are bugging out because it's the handle part of the FilterClasses function and technically not an array. I've encountered this before, and I don't know how to fix it. So while I did convert as much old syntax over to new syntax as I could, the plugin is not compilable due to this bit of code below:

Compile error lists for both plugins inside
Attached Files
File Type: inc updater.inc (2.3 KB, 123 views)
File Type: sp Get Plugin or Get Source (commandfilters_withcomments.sp - 129 views - 8.7 KB)
File Type: sp Get Plugin or Get Source (commandfilters_without.sp - 127 views - 7.1 KB)

Last edited by 404UserNotFound; 08-27-2016 at 00:16.
404UserNotFound is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 08-27-2016 , 12:15   Re: [Any] Super Targeting (Filters) |Updated 2/25/16|
Reply With Quote #22

hClients will need to be handled the old way instead of the enum way because it's type of "Handle" and not "ArrayList"
Mitchell is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 08-31-2016 , 15:17   Re: [Any] Super Targeting (Filters) |Updated 2/25/16|
Reply With Quote #23

Quote:
Originally Posted by abrandnewday View Post
~snip~
Thanks! I've went ahead and added onto your changes and fucked everything up!
I havent tested it but I enhanced the random filter to be easier to understand, it's literally 5 lines of code now
I've also separated the big blocks of codes into their own methods in order to simplify the client loop, if the filter is set to a single client then it wont do the loop and escape faster.
The random feature will randomly search for clients in the ArrayList and remove them until the ArrayList.Length is less than or equal to the number of random clients that is being searched for , this probably isn't the best way to find 1 single random player out of 32 players but it's the easiest way, perhaps i can add an if clause and cut some of the steps if the amount of players being picked < (MaxClients / 2) then it will use the opposite method and add to a new ArrayList instead of subtract from the current.
I haven't tested this at all, so some features (like the inverted) might be wrong since I tried to use Bitwise operators.
Source:
https://bitbucket.org/MitchDizzle/su...erTargeting.sp

Last edited by Mitchell; 08-31-2016 at 15:19.
Mitchell is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 08-31-2016 , 20:29   Re: [Any] Super Targeting (Filters) |Updated 2/25/16|
Reply With Quote #24

Quote:
Originally Posted by Mitchell View Post
Thanks! I've went ahead and added onto your changes and fucked everything up!
Is...is this good or bad? I honestly can't tell what you're trying to convey

EDIT: Oh thank god, you got rid of those weird "Is_Class()" and "Is_PlayerClass()" (or something) defined checks that you had originally and actually switched to a better system.

Last edited by 404UserNotFound; 08-31-2016 at 20:36.
404UserNotFound is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 08-31-2016 , 21:15   Re: [Any] Super Targeting (Filters) |Updated 2/25/16|
Reply With Quote #25

Quote:
Originally Posted by abrandnewday View Post
Is...is this good or bad? I honestly can't tell what you're trying to convey

EDIT: Oh thank god, you got rid of those weird "Is_Class()" and "Is_PlayerClass()" (or something) defined checks that you had originally and actually switched to a better system.
Yeah i wanted to get rid of GetEngineVersion() also so i switched to a static variable and just looked up the netprops.
Mitchell is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 09-01-2016 , 20:07   Re: [Any] Super Targeting (Filters) |Updated 2/25/16|
Reply With Quote #26

Quote:
Originally Posted by Mitchell View Post
Yeah i wanted to get rid of GetEngineVersion() also so i switched to a static variable and just looked up the netprops.
Hey, ain't nothing wrong with GetEngineVersion. It's a heck of a lot better than GetGameFolderName.

But for this particular purpose, yeah, the way you did it is much better than GetEngineVersion.
404UserNotFound is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 11-21-2017 , 22:48   Re: [Any] Super Targeting (Filters) |Updated 2/25/16|
Reply With Quote #27

This returns '[sm] no matching client was found' for anything I tried.

version 1.4.11 doesn't compile, and version 1.3.61 doesn't work.

Is there any working plugin that allows me to target @bluebots, @redbots, @bluehumans, @redhumans ?
PC Gamer is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 11-22-2017 , 11:37   Re: [Any] Super Targeting (Filters) |Updated 2/25/16|
Reply With Quote #28

I guess I never switched it over to the GitHub links.
Edit: I've updated merged the 1.7 changes and removed updater etc.
https://github.com/MitchDizzle/Super-Targeting

Last edited by Mitchell; 11-22-2017 at 11:51.
Mitchell is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 11-22-2017 , 14:25   Re: [Any] Super Targeting (Filters) |Updated 2/25/16|
Reply With Quote #29

Thanks Mitchell!

It works now.
PC Gamer is offline
kot4404
Senior Member
Join Date: Mar 2013
Old 01-12-2018 , 14:58   Re: [Any] Super Targeting (Filters) |Updated 2/25/16|
Reply With Quote #30

Is it possible to add few checks to 1 filter?

Quote:
"@!zbots"
{
"text" "all but Z Flagged Admins"
"bots" "1"
"flag" "z"
}
I guess so from this

Quote:
"@scout"
{
"text" "all Scouts"
"team" "0"
"class" "1"
}
but mine doesn't work, it should slay nonadmin players only but slays the bots also ( game is l4d2 )

Last edited by kot4404; 01-12-2018 at 15:18.
kot4404 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:51.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode