Author Topic: URM - User Restrictions Module for ULX  (Read 43711 times)

0 Members and 1 Guest are viewing this topic.

Offline eriikok

  • Newbie
  • *
  • Posts: 24
  • Karma: 14
URM - User Restrictions Module for ULX
« on: September 23, 2015, 04:25:49 PM »
URM - User Restrictions Module for ULX

URM is an addon to allow server admins to restict or limit entities and tools from usergroups. It also features a loadout system that allows unique loadouts to be set for different usergroups. The restrictions, limits, and loadouts can be unique to usergroups.
It has a GUI integrated into the ULX XGUI under "Settings", this is fully functional and I recommend to use it over the commands, as the commands may be difficult to use.

This was originally an addon I wrote to use on my own server, but I have cleaned it up a bit and decided to release it to whomever needs it.

DOWNLOAD
GITHUB

INSTALLATION
Drop URM folder into garrysmod/addons folder.



Loadouts
The loadout tab lets you select which weapons you want a usergroup to spawn with, and how much ammo you want them to spawn with. You can also select and set one of the weapons as the primary weapon, this will be the weapon they hold in their and when they spawn, the primary weapon is marked green. If no primary weapon is selected then the player will spawn with the latest weapon added to the loadout. You can also set the loadout to the loadout of a player on the server, this will delete the old loadout and replace it with the selected player's loadout, the weapon the player is holding will be set as the primary weapon.

GUI Screenshots with instructions:
Quote

#1: This list contains all the weapons that can be added to the loadout using the add button below it. You can select multiple weapons to be added.
#2: With this textbox you can search through the list below it(#1). It supports Regular Expressions.
#3: The edit button edits the selected item primary(#5) and secondary(#5) ammo on the item list (#6).
#4: This buttons set the selected item on the item list(#6) as the primary weapon for the selected usergroup(s). Setting a weapon that already is a primary weapon will unset it.
#5: These are the ammo sliders, they are used to set how much ammo you want to add to a weapon when adding it to the loadout. Weapons that don't use ammo have no repercussions from this.
#6: This is the item list. It shows what weapons are in the loadout, which group's loadout it belongs to and how much ammo it has. You can select multiple items (for deleting).
#7: This list shows all the usergroups on the server. If you select more than one, you will see all of the selected usergroup's loadout on the item list(#6), you can also add items to multiple groups at once.
#8: This button opens a new window where you can set the selected usergroup's loadout to a players loadout. (See image below)


#1: This window pops out when you press the "Set as..." button.
#2: This list contains all the players on the server, you can only select one player.
#3: With this you can search through the players on the list above(#2)
#4: Set the selected players loadout as the selected usergroup's loadout.





Restictions
The restrictions tab allows you to restrict different entities/models/weapons from usergroups. The following can be restricted:
- Effects             
- Entities           
- NPCs
- Weapon pickup 
- Weapon spawn 
- Props
- Ragdolls           
- Tools               
- Vehicles

GUI Screenshots with instructions:
Quote

#1: The itemlist, it shows what items are restricted from what group.
#2: This list contains all the items that can be restricted from the selected type on the type list(#3). In the cases of "Props", "Ragdolls", and "Effects" this list will disappear and the search box(#5) will be used to enter a model path.
#3: This is the type list. You use it to select what kind of item you want to select. As you select different types, the item list(#1) will show all the restricted items of that type.
#4: The usergroup list is used to select one or more usergroups which you want to restrict items from. The selected usergroups restrictions of the selected type(#3) is shown in the item list(#1).
#5 (The button): The edit button will set the selected item on the item list to the selected item in the restrictable items list(#2). It is the same as removing one item and adding another.
#5 (The textbox): This is used to search through the list below it(#2). In the cases of "Props", "Ragdolls", and "Effects" this box will be used to enter a model path.





Limits
The limit tab allows you to limit models, entities, weapons, and other limits for usergroups. You can set the standard sandbox limits (prop limit, npc limit, dynamite limit, etc.), this will override the sandbox limit. It also allows you to limit single entities, props, vehicles and more, you can set the limit of a model or any other item. You can also set the limit of a group of items to one limit, this means you can set an items limit to a custom limit and set the custom limit to a number. A custom limit is not a number but a variable that other limits can be set to, all the items with the custom limit will count into the custom limits count. For example, you can set all the combine npcs to a limit called "combine" (you can name the limit whatever you want) and set the combine limit to 5; now you can only have 5 combine npcs at the same, even if they are not the same npc. This example would also work for props. You can set a custom limit to a custom limit, the item in the first custom limit will not count in the second custom limit, but the first custom limit will simply have the same limit as the second limit. (Note that if you name a custom limit the same as one of the standard sandbox limits, then you will override them and set the limit to whatever you set your custom limit. Basically, don't call your custom limit for "props", or "npcs")

GUI Screenshots with instructions:
Quote

#1: This list contains all the standard sandbox limits, the box over it is used to search through it.
#2: This slider sets the limit you want.
#3: This buttons shows additional options, like limiting models, other items, and custom limits.


#1: This is where you enter a custom limit, if you enter something here the limit slider will be disabled and the added item's limit will be set to the custom limit you typed into the box.
#2: This is where you set the limit of .our custom limit, you can set it to either another custom limit, or to a normal limit, using the slider. This is also where you set the limit of a model,
#3: This list contains everything you can limit, excluding models, custom limits, and the standard sandbox limits. The textbox above it is used to search through the list.
#4: This button will hide the additional options




I may post this to the workshop in the future, any other workshop uploads will be taken down.

Feel free to ask any question or requests.
« Last Edit: September 24, 2015, 01:13:57 AM by eriikok »

Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Re: URM - User Restrictions Module for ULX
« Reply #1 on: September 23, 2015, 07:37:07 PM »
Your github link is broken, but I would love to see it.
« Last Edit: September 23, 2015, 07:48:01 PM by Aaron113 »

Offline Bryantdl7

  • Jr. Member
  • **
  • Posts: 86
  • Karma: -2
Re: URM - User Restrictions Module for ULX
« Reply #2 on: September 23, 2015, 07:53:44 PM »
Your github link is broken, but I would love to see it.
I found it via google https://github.com/Weol/URM

My thoughts on the addon; the addon has potential, fix all those bugs I outlined on the github page and I'll definitely consider switching to it. That is if you plan on  not dropping support for it soon
« Last Edit: September 23, 2015, 07:56:11 PM by Bryantdl7 »



Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Re: URM - User Restrictions Module for ULX
« Reply #3 on: September 23, 2015, 08:08:01 PM »
I found it via google https://github.com/Weol/URM

Yeah, I found it as well.  He should update the OP though.

EDIT:  It's nice though, I like it.  Nice and clean.  The only thing I could say is the GUI seems maybe a bit cluttered, but maybe it's just the pictures with the writing on it.
« Last Edit: September 23, 2015, 08:17:20 PM by Aaron113 »

Offline eriikok

  • Newbie
  • *
  • Posts: 24
  • Karma: 14
Re: URM - User Restrictions Module for ULX
« Reply #4 on: September 24, 2015, 01:20:40 AM »
Fixed the link. Thanks for the feedback, although I do not know what OP is.

You probably noticed that it isn't very... refined system. I used originally used it on my own server, where everything was fine tuned to work. Also the way I handle data transfering between clients and server is rather unorthodox, as I didn't fully grasp how the system worked. I will solve any bugs that are reported of course.

I've been thinking of taking an object oriented approach to the system, instead of relying purely on tables, and switch to SQLite instead of JSON as it would improve performance.

I will keep updating it as long as I can.

Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Re: URM - User Restrictions Module for ULX
« Reply #5 on: September 24, 2015, 09:53:20 AM »
Fixed the link. Thanks for the feedback, although I do not know what OP is.
Original Post.

You probably noticed that it isn't very... refined system. I used originally used it on my own server, where everything was fine tuned to work. Also the way I handle data transfering between clients and server is rather unorthodox, as I didn't fully grasp how the system worked. I will solve any bugs that are reported of course.

I've been thinking of taking an object oriented approach to the system, instead of relying purely on tables, and switch to SQLite instead of JSON as it would improve performance.

I will keep updating it as long as I can.
I skimmed it, but what I seen of it, it looked good.  I would strongly recommend Workshop though, lots of people seem to prefer it.

Offline TheSouthernSanta

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
Re: URM - User Restrictions Module for ULX
« Reply #6 on: September 25, 2015, 09:12:32 PM »
Nice, Really considering switching from URS to URM if this is confirmed to be the new best thing. Im liking how it can stop weapon pickups, this is a major thing needed for me on my server as people like to try find exploits in spawning and getting weapons, and then when they get the weapons everyone else uses that exploit, some cannot be removed, this could fix a few of those hard to reach weapon issues with URS. im not saying that URS is bad either, it's just also that URS has to manually search for the swep or manually type the sent you want to block. I would really like to see this supported for years to come. I am also willing to offer my server as a test host.

Offline DarKevin

  • Newbie
  • *
  • Posts: 23
  • Karma: 1
  • sup
Re: URM - User Restrictions Module for ULX
« Reply #7 on: September 26, 2015, 01:46:14 PM »
My reaction as a server owner who has been struggling with URS for over 2 years:



                                                   




Offline DarKevin

  • Newbie
  • *
  • Posts: 23
  • Karma: 1
  • sup
Re: URM - User Restrictions Module for ULX
« Reply #8 on: October 05, 2015, 03:59:05 PM »
Hmm, seems like people can spawn restricted stuff with adv dupe 2.
Pickup restrictions prevent weapons to be abused, but for example I haven't found a way to restrict the Bouncy Ball that gives you HP.
I even tried restricting its model, which worked with Falcos Prop Protection, but it didn't work.
Is there something you can do about it?

Offline eriikok

  • Newbie
  • *
  • Posts: 24
  • Karma: 14
Re: URM - User Restrictions Module for ULX
« Reply #9 on: October 06, 2015, 06:22:46 AM »
Technically yes, but that would involve overriding Adv. Dupe's spawn function to call a hook, so no. Adv. Duplicator 2 and the normal duplicator do have a way to check if an entity can be pasted, but it does not tell which player is trying to spawn it, so I don't see how I could add a way to prevent it from spawning from one player, and not another one.

This has been fixed.
« Last Edit: October 23, 2015, 08:56:13 AM by eriikok »

Offline eliman

  • Newbie
  • *
  • Posts: 14
  • Karma: 0
Re: URM - User Restrictions Module for ULX
« Reply #10 on: October 17, 2015, 01:05:49 PM »
The addon works great, just that i'm encountering one problem and I've narrowed it down and its URM which is causing my problem. The problem i'm running into is spawning props and picking up sweps

Weapon example:
SBoxLimit_weapon_rpg
Though I still get this error popup on my right hand side, I can still pick it up and use the swep

Prop example:
SBoxLimit_models/props_c17_streetsign005d.mdl
When I get this popup error on the right hand side, I won't be able to spawn any props

All my sbox limits such as props, lights, lamps, etc are set properly as well.

Is there a possible way to fix this problem through the settings and whatnot? I've tried a ton of things and it isn't working out.

Offline eriikok

  • Newbie
  • *
  • Posts: 24
  • Karma: 14
Re: URM - User Restrictions Module for ULX
« Reply #11 on: October 22, 2015, 02:52:38 AM »
The addon works great, just that i'm encountering one problem and I've narrowed it down and its URM which is causing my problem. The problem i'm running into is spawning props and picking up sweps

Weapon example:
SBoxLimit_weapon_rpg
Though I still get this error popup on my right hand side, I can still pick it up and use the swep

Prop example:
SBoxLimit_models/props_c17_streetsign005d.mdl
When I get this popup error on the right hand side, I won't be able to spawn any props

All my sbox limits such as props, lights, lamps, etc are set properly as well.

Is there a possible way to fix this problem through the settings and whatnot? I've tried a ton of things and it isn't working out.

This is wierd. URM does not operate with Sbox at all. If you have set a limit for "SBoxLimit_models/props_c17_streetsign005d.mdl" then it will not work; "SBoxLimit_" should not be there at all. Howerver, if you set a limit for "models/props_c17_streetsign005d.mdl" it will work. The same goes for the weapon part. I don't understand where you have "SBoxLimit_" from.

URM does not interfere with the Sbox limits unless you have overridden the Sbox limits with URM. So if there is no "props" limit in URM it will continue to the SBox limit.

Offline eliman

  • Newbie
  • *
  • Posts: 14
  • Karma: 0
Re: URM - User Restrictions Module for ULX
« Reply #12 on: October 22, 2015, 03:25:42 PM »
Quote from: eriikok
This is wierd. URM does not operate with Sbox at all. If you have set a limit for "SBoxLimit_models/props_c17_streetsign005d.mdl" then it will not work; "SBoxLimit_" should not be there at all. Howerver, if you set a limit for "models/props_c17_streetsign005d.mdl" it will work. The same goes for the weapon part. I don't understand where you have "SBoxLimit_" from.

URM does not interfere with the Sbox limits unless you have overridden the Sbox limits with URM. So if there is no "props" limit in URM it will continue to the SBox limit.

Yeah.. I don't know whats going on. I didn't set any limits for certain props or weapons at all, but like I said before I did set a overall prop spawning limit.

Let me know if you have any suggestions on how to counter / fix this issue, or need anymore information.

Offline eriikok

  • Newbie
  • *
  • Posts: 24
  • Karma: 14
Re: URM - User Restrictions Module for ULX
« Reply #13 on: October 23, 2015, 01:04:47 AM »
Allright, I have an idea. Try to rename your URM folder to "XXXXXXXURM", so that it loads last.

If that does not work, could you give me the list of addons you use, in case there are any conflicts. Also your console.log would be of help, if its not too much trouble.

Offline eriikok

  • Newbie
  • *
  • Posts: 24
  • Karma: 14
Re: URM - User Restrictions Module for ULX
« Reply #14 on: October 23, 2015, 04:14:31 AM »
Also, is your gamemode sandbox or a derivative of sandbox?