I created a little script that filters what perks the player has based on a input array(specialties). The script is intended for stock perks but you can add whatever you want to the array and it should work just fine.
Firstly you need to get the actual(technical) perk name that the same uses. Once you have that all you need to do is add a new value to the array like So:
and thats it. Make sure to give credit if you use it. Comments, questions, suggestion's are all welcome. Just don't be an ass by making an "optimized" version unless its for personal use.
P.S. I wasn't sure if i should have made the players variable a level variable. If it should be then please tell me so i can change it ASAP.
Last Edit: April 07, 2014, 09:39:02 pm by daedra descent
Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
lol i dont think it a good idea to make players a "level" var under any circumstances lol. in any case we can use our old friend which is the "self" ent
lol i dont think it a good idea to make players a "level" var under any circumstances lol. in any case we can use our old friend which is the "self" ent
I didn't think it would either. I assumed that the .has_<perk> is persistent on the players[k] variable so that even if you where to create an entirely new function the value would still be set, which is why i'm asking.
I had thought about using self, but i figured it would be easier to keep everything in the function.
Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
I didn't think it would either. I assumed that the .has_<perk> is persistent on the players[k] variable so that even if you where to create an entirely new function the value would still be set, which is why i'm asking.
I had thought about using self, but i figured it would be easier to keep everything in the function.
You tell people not to "optimize" your scripts and then you ask for help. That's the irony. The people who are editing your scripts are trying to help you write better scripts.
You tell people not to "optimize" your scripts and then you ask for help. That's the irony. The people who are editing your scripts are trying to help you write better scripts.
You tell people not to "optimize" your scripts and then you ask for help. That's the irony. The people who are editing your scripts are trying to help you write better scripts.
Oh i see. That wasn't exactly what i was getting at. I had meant for people not to 1-up me in a way that is rude or disrespectful. Of course suggestions, feedback, questions, etc are welcome.
dual wasnt being rude when he posted the code the other time lol, you have to accept that sometime your code has useless stuff and well dual is being known for making quality scripts
dual wasnt being rude when he posted the code the other time lol, you have to accept that sometime your code has useless stuff and well dual is being known for making quality scripts
I never said anyone's username in particular.
Also, can we please stay on topic? I really need to know if this works for everyone else and what their thoughts are on it. has anyone tried it on coop?
Last Edit: April 07, 2014, 10:40:38 pm by daedra descent
dual wasnt being rude when he posted the code the other time lol, you have to accept that sometime your code has useless stuff and well dual is being known for making quality scripts
Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.