View Single Post
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