ULX

Poll

Do You Like The New GUI Better?

Yes, Much Better!
71 (59.7%)
Yeah
22 (18.5%)
I Don't Care, I Use The Console
14 (11.8%)
No
4 (3.4%)
I Prefer The Old GUI
8 (6.7%)

Total Members Voted: 116

Author Topic: URestrict [Depreciated-author no longer supports]  (Read 491585 times)

0 Members and 2 Guests are viewing this topic.

Offline Jethro

  • Newbie
  • *
  • Posts: 45
  • Karma: 1
Re: URestrict
« Reply #120 on: July 06, 2009, 10:09:09 AM »
I love this script but have had a lot of problems with it so far.
One probelm I have encountered:
  • When I added gmod_wire_turret and restared the server it would not load the Urestrict menu
  • One of my groups "resmember" is not showing up in the tool restrict menu when you click on an tool
Code: [Select]
All groups sspecified in loadout Menu
"owner" <exempt>
"superadmin" <exempt>
"admin" <exempt>
"moderator"
"resmember"
"member"
"respected"
"regular"
  • Another problem is that the newest version (21) does not give you the option to turn on or off Weather or not "weapons are given to the player/group on spawn"
I fixed this by editing all the <toolname>.txt to include "resmember" but needs to be done with each new tool.

Version being used: Sticking to Version 20 as you are unable to define what each group spawns with in 21.

Offline jay209015

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 934
  • Karma: 62
    • Dev-Solutions
Re: URestrict
« Reply #121 on: July 06, 2009, 10:29:01 AM »
Quote
Another problem is that the newest version (21) does not give you the option to turn on or off Weather or not "weapons are given to the player/group on spawn"
     - Loadouts have to be configured to determine what each groups allow to use; then you apply a loadout to a group in game from the menu
     - As far as choosing what they spawn with I'm working on adding that feature now, currently everyone except excluded groups spawn with:
          "weapon_physgun", "weapon_physcannon", "gmod_tool", "gmod_camera", "weapon_crowbar"  as defined by URestrict.DefaultLoadout at
           the top of URestrict.lua    ::EDIT WITH CAUTION::
An error only becomes a mistake when you refuse to correct it. --JFK

"And thus the downfall of the great ULX dynasty was wrought not by another dynasty, but the slow and steady deterioration of the leaders themselves, followed by the deprecation of the great knowledge they possessed." -Gmod, Chapter 28, verse 34 -- Stickly

Offline jay209015

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 934
  • Karma: 62
    • Dev-Solutions
Re: URestrict
« Reply #122 on: July 06, 2009, 10:41:52 AM »
Revision: 22
Author: jay
Date: 12:39:33 PM, Monday, July 06, 2009
Message:
Added A Configuration For Choosing What Weapons Users Are Allowed To Spawn With EX: You have the default loadout set to allow the user group to use with pistol, crowbar, physgun, tool gun, and camera.   And you have the trusted loadout set to allow admins to use pistol, crowbar, physgun, tool gun, and camera, glock, rpg, ... ect and you only have the pistol allowed in the default_spawn.txt both the user group and admin group will only spawn with the pistol, but the admin group would still be able to use the rpg, glock,..ect if they spawn it or pick one up somewhere while the user group will still have to follow the restrictions.
----
Modified : /lua/ULib/modules/server/URestrict.lua

Example of new configuration:

...\garrysmod\data\URestrict\Loadouts\default.txt:
Code: [Select]
"weapon_physgun"
"weapon_physcannon"
"gmod_tool"
"gmod_camera"

...\garrysmod\data\URestrict\Loadouts\trusted.txt:
Code: [Select]
"weapon_physgun"
"weapon_physcannon"
"gmod_tool"
"gmod_camera"
"weapon_crowbar"
"weapon_pistol"
"weapon_357"
"weapon_pistol"

...\garrysmod\data\URestrict\Loadouts\default_spawn.txt:
Code: [Select]
"weapon_physgun"
"weapon_physcannon"
"gmod_tool"
"gmod_camera"
"weapon_crowbar"

With this configuration, both groups will spawn with:
"weapon_physgun"
"weapon_physcannon"
"gmod_tool"
"gmod_camera"

But the group using the trusted loadout would spawn with a crowbar too. Even though they're allowed to use the pistol, and 357, they won't spawn with it.



Revision: 23
Author: jay
Date: 12:41:30 PM, Monday, July 06, 2009
Message:
Updated the URestrict Title Bar To Show The Current Revision
----
Modified : /lua/ULib/modules/client/URestrict_cl.lua

« Last Edit: July 06, 2009, 10:48:02 AM by jay209015 »
An error only becomes a mistake when you refuse to correct it. --JFK

"And thus the downfall of the great ULX dynasty was wrought not by another dynasty, but the slow and steady deterioration of the leaders themselves, followed by the deprecation of the great knowledge they possessed." -Gmod, Chapter 28, verse 34 -- Stickly

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: URestrict
« Reply #123 on: July 06, 2009, 02:39:59 PM »
because all mine are unique.

I forget what, but we've seen some versions Gcombat break a few things in ULX, unique names or not.
I think it was somehow allowing players to pick up each other, even if not admin.
Unless Garry has improved his hook system, if any script shares a hook type (playerloadout for instance), and for any reason returns anything (true false or otherwise)  instead of just returning... that hook stops for all other scripts.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Jethro

  • Newbie
  • *
  • Posts: 45
  • Karma: 1
Re: URestrict
« Reply #124 on: July 06, 2009, 02:45:21 PM »
Thankyou so much for adding that feature. Loadouts seem to work
One problem still remaining like i said before is whenever I seem to add a tool it breaks the in game menu.
I deleted the /urestrict/tools folder but this had little effect.
When In game and go to access the in game menu i get this error:
Code: [Select]
] urestrict
Timer Error: ULib/modules/client/URestrict_cl.lua:228: attempt to concatenate field '?' (a nil value)
Note: I have not edited any files in the Addon folder and have Revision 22 now.

Offline jay209015

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 934
  • Karma: 62
    • Dev-Solutions
Re: URestrict
« Reply #125 on: July 06, 2009, 03:08:40 PM »
Quote
I forget what, but we've seen some versions Gcombat break a few things in ULX, unique names or not.
I think it was somehow allowing players to pick up each other, even if not admin.
Unless Garry has improved his hook system, if any script shares a hook type (playerloadout for instance), and for any reason returns anything (true false or otherwise)  instead of just returning... that hook stops for all other scripts.
     - Oh yeah, I remember that.
Quote
] urestrict
Timer Error: ULib/modules/client/URestrict_cl.lua:228: attempt to concatenate field '?' (a nil value)
     -  Temporarily removing GCombat, and see if URestrict works then, if not try removing URestrict and start fresh with the svn. I looked at the line the error above show an error for, and frankly I don't see a way for that to be broken especially since that line isn't even related to the tools section of the script.
Code: [Select]
LButtonName:SetText( v.. "(" ..URestrict_Loadout[v].. ")" )     - That's line 228: and that is for the loadout menu where it show admin(trusted) ect..
An error only becomes a mistake when you refuse to correct it. --JFK

"And thus the downfall of the great ULX dynasty was wrought not by another dynasty, but the slow and steady deterioration of the leaders themselves, followed by the deprecation of the great knowledge they possessed." -Gmod, Chapter 28, verse 34 -- Stickly

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given