Ulysses
Ulysses Stuff => Releases => Ulysses Release Archives => Topic started by: JamminR on February 01, 2009, 07:41:17 PM
-
Team Ulysses is proud to present our latest and greatest software: Ulysses (admin+) No Limited
Not compatible with Gmod13.
UnoLimited v1.1 (Basic) ;
- Does NOT require ULib
- Allows Admins to have no limits to any sbox_max<item here> server limit.
- Allows SuperAdmins to have no limits to any sbox_max<item here> server limit.
Download: ulyssesmod.net/JamminR/projects/UnoLimited_v1_1.zip
Unzip to your server's Gmod/addons folder.
GM13+ compatible, see news item below
UnoLimited v2 (ENHANCED) ;
- Requires ULib 2.4+
- Allows you to set a multiplier (0 to 2, can used decimals .75 , 1.5, etc) for each group you wish to control.
- Defaults to 1 (standard limit) if you do not set up a custom group.
- Allows setting a group 'unlimited' using "-1"
11/26/2012 - GM13 Update by community member "nexbr"!
As I've pretty much lost interest, a community member has picked up the gauntlet!
See http://forums.ulyssesmod.net/index.php/topic,6720.0.html (http://forums.ulyssesmod.net/index.php/topic,6720.0.html)
7/16/2010 - UPDATE - Thanks to AtomicSpark, he corrected linux compatibility issues for version 2(now 2.2)
Download: ulyssesmod.net/JamminR/projects/unolimited_v2_2.zip
Unzip to your server's Gmod/addons folder.
Make sure to delete /addons/UnoLimited_v1* if you have it already.
Once unzipped, go into the addons/UnoLimited_v2/lua/ULib/modules folder, open the only file there, and edit the table at the top with any custom groups you wish to adjust. Save, restart server.
Please comment in this thread any ideas.
(No, I won't do a menu. This is meant to be a set and forget type addon.)
I'm already considering setting limits for admins within the file itself, at the most a variable set at the top of the file. Done in V2.
I must mention and give credit that this is 98% code from Garry's own functions.
Megiddo started a framework some time ago to go past those limits and functions (found in another thread)
I just edited some syntax issues, and packaged it nicely in addon format.
Team Ulysses - Striving for Simplicity.
v1.1 - Fixed Sent Check
v2 - ULib enhanced group limit control.
v2.1 - Fixed CheckLimit and null value for "ply" error (http://forums.ulyssesmod.net/index.php/topic,3864.msg16265.html#msg16265)
v2.2 - AtomicSpark corrected linux compatibility (case-sensitivity) (http://forums.ulyssesmod.net/index.php/topic,3864.msg20612.html#msg20612) - Thanks!
v2.3 - nexbr made Enhanced version compatible for GMod 13 (http://forums.ulyssesmod.net/index.php/topic,6720.0.html) - Great!!
Edit - Split from the Release Archives. Accidentally moved, forgetting that nexbr had updated.
-
Good job JamminR! :P
-
:D YAY! *Uploads to server.*
-
Sweet!
-
Nice,
Will there be a SVN for this?
-
I don't plan one. If/when I do make any changes, they won't be often.
-
o noes,
I have have people on my server complaning about how they cant spawn enitiys, will i just got done adding and removing addons till i found what addon was doing it.
it seems to work fine for me (the admin haha) loved it even, but it seems my friends dont :(
thanks for the fun run.
-
Please give more detail.
Which entity?
Errors other people are getting?
What prop protect do you use?
-
*rolls eyes*
Never mind dv, no need to answer any of those. I know why its not working.
I know that early last year Garry released an update that removed the ability to set a sent limit using "sbox_maxsents"
I thought that by now, he would have put it back. Why?
He's still using a command that EXPECTS that limit to be there, even if it's 0.
This release still uses his old check. I'll fix it, quite easy.
I'll just remove the check. His returns always true anyway./me shakes fist at garry
-
UPDATED - v1.1 - Fix Sent Check
See original post.
-
you are the man.
cant wait to give it a try again.
BTW just for the of it im using UPS again but now the menu wont showup anymore after i disabled it for a gamemod ^_^! GG ME, and the other would be all.
I was also wonding why that command stoped working myself... now i know
-
w00t its amazing addon!!! :D
-
This has awesome-bean potential. Been looking for something like this for a while ever since I saw the No limit for admin feature in *cough*assmod*cough*
-
Can you make it so you can set limits based on groups?
because my server has Newbie Casual Addicted Trusted and then the mods and admin groups,
I want to be able to set a limit based on the groups. would be nice if you considered it or it was put into ulx itself
-
I have two custom ranks for my server:
uberadmin(donators) and owner(me) they currently still have limits even with unolimited installed. is there anyway to get unolimited to recognise us as admins?
-
is there anyway to get unolimited to recognise us as admins?
This uses the Gmod standard "IsUserGroup" to check for both a group named admin or superadmin.
If the player isn't found to be in one of those groups, limits get set.
If using ULib, you can set your custom groups to inherit either admin or superadmin, and they should work without limits from there.
-
Cool thanks for this, its very nice :)
-
This uses the Gmod standard "IsUserGroup" to check for both a group named admin or superadmin.
If the player isn't found to be in one of those groups, limits get set.
If using ULib, you can set your custom groups to inherit either admin or superadmin, and they should work without limits from there.
inheritance worked fine thanks ! L:D
-
Awesome Addon. I recently began coding an RP server and I didn't want this as a seperate addon so I incorporated it into the ULX files and added a ConVar to toggle it and also added a button to the admin menu and it works great! Thanks Jammin, You da man! (b^_^)b
-
Thanks. Again, team effort. 97% Garry - 2% Megiddo writing past limits, 1% me correcting some syntax, working past Garry's updates, and putting it in addon format.
We love simplicity :)
-
All/anyone - I'm considering updating this to allow group configuration.
I intend to make (yet another one!) a configuration area where anyone can set the groups they want and what level.
I believe the best way would be to allow whole/or decimal multipliers over the actual server limit.
This, at least in my mind, allows 'autoadjust' during any live game.
So this way, no hard code within UNoLimited exists on any limit. Props, ragdolls, vehicles, etc.
Theoretical;
sbox_maxvehicles = 1
sbox_maxprops = 200
sbox_maxragdolls = 1
Superadmins - no limit - can go above server settings as per version 1.1
Admins - (2 x limit) + limit (600 props, 3 vehicles, 3 ragdolls)
<group a> - (1.5 x limit) + limit = ( 500, 2(rounded), 2(rounded)
<group b> - (1 x limit) + limit = ( 400, 1, 1)
<group c> - (.5 x limit) + limit = ( 300, 1, 1)
...
you get the idea I hope.
Some variable would need to be made if limit is actually less than 1...set limit to 0 or 1 decided by host
The above would allow changing server limits at any time. If you wanted to increase limits for props... this would still limit without a server restart to the percentage of props, still keeping all the other sbox_max limits
Anyone else have any other/better ideas?
-
Sounds great. Pretty much exactly what I would have done if I had carried out the project. :)
-
Since today's update (27th July '09), UnoLimited has been broken.
I am superadmin on my server, in the gmod settings and in ULX, and it has always worked before. I have been hitting all the limits, and have even tried lua_openscript'ing the unolimited file, but it still won't work.
-
Any errors in server console, before, during, or after attempting to go past limits?
Any errors in client console? (Same)
-
It works fine on my server.
-
I see the blatant screaming change within his code. Go ahead and provide me any errors, as it may assist finding less blatant issues.
This all boils down because Garry changed a Metatable name. Abbreviated it from GAMEMODE: to GM:
It's more efficient, saves bytes later, but, just a little thing that can break so much.
Until I get a fix link, go ahead and change all your GAMEMODE: to GM: within addons\UNoLimited\lua\autorun\server\UNoLimited.lua
It works fine on my server.
Did you update your server?
-
I see the blatant screaming change within his code. Go ahead and provide me any errors, as it may assist finding less blatant issues.
This all boils down because Garry changed a Metatable name. Abbreviated it from GAMEMODE: to GM:
It's more efficient, saves bytes later, but, just a little thing that can break so much.
Until I get a fix link, go ahead and change all your GAMEMODE: to GM: within addons\UNoLimited\lua\autorun\server\UNoLimited.lua
Did you update your server?
Yes, my server is up to date.
-
Hm.
After 5 reboots mine is working again ;D
-
Glad it works. I posted on facepunch to get a reaction.
Seems as cold there as it ever has been. :)
-
-snip-
I do like your feature ideas and would probably use them on my server. However, by "I intend to make (yet another one!) a configuration area..." do you mean have a separate UnoLimited.cfg file that defines how much each group can spawn and then pull the users from ulib? Or do you mean define a completely separate group and users list? One of these methods obviously requires ulib. My point is that we already have two user/group systems. Right now we have ulib's and Garry's Mod's users.txt files. I (and assume others) put players in both files for compatibility with other add-ons. If UnoLimited doesn't utilize ulib (to be a stand-alone add-on), it would just make this more of a hassle then it already is.
-
atomicspark... My idea wouldn't be a separate file... and would hopefully only be a one time edit.
To continue to keep it non-reliant on ULib, I'd just add a table at the top for people to edit similiar to
UnoGroups = {
admin = <#some multiplier#>
operator = <#some multiplier#>
...
}
Any one who spawned something that wasn't a member of those groups would simply be limited to the actual limit set on the server. Those in the groups would be limited to <multipler times limit>
Thats my general idea anyway. Still haven't fully written it in stone yet
-
So if people didn't use ulib, it should get groups from Garry's Mod users.txt? Makes sense.
-
Nice,
Will there be a SVN for this?
I hate to quote myself but this was dumb to ask! Something so small and don't rarely even need updates be a SVN is a joke...
I should have asked,
Will this be included into ULX/ULib later :)
example: a way to set if users have the right to use it or not is by using the allows/deny system in the files users.txt, and or groups.txt or in-game/console commands
If you don't like my idea just ignore this than :)
Still love the addon :) very usfull
-
Dv2236, though it's up to the rest of the team, I'd say probably not.
With the big changes coming to ULib, I don't think it would be overly difficult to make into a ULib group compatible addon, but, that would for all it's current intents and purposes complicate it.
-
UPDATED
Version 1.1 can still be downloaded. - No ULib required. For admins and superadmins, gives no limit.
Version 2 now allows per-ULib group control, range 0 to 2 multiplier (can used decimals .75 , 1.5, etc), or -1 for unlimited.
See first post (http://forums.ulyssesmod.net/index.php/topic,3864.msg13595.html)
-
Yay! :D
-
My players are apparently unable to spawn wiremod. I'm also getting this error spammed in my SRCDS console:
ULib/modules/UnoLimited.lua:32: attempt to index local 'ply' (a nil value)
My ULX/ULib are up-to-date as of today at 1PMish CST. My sv_downloadurl cache is also working properly. Since I'm not at home, I'm going to just remove the add-on for now. I'll try to debug later when I get off of work.
-
I'll have to troubleshoot later. Current in middle of Labor day family duties.
Wire must not follow Garry's sbox information to include the player...which, in it's own right..is odd.
-
Wire does use sbox_maxwire_*. Now if it's a custom script, I'm not sure. What is weird is I didn't get any errors last night. More troubleshooting is needed.
-
I was aware of the sbox_maxwire stuff... I'm just not sure why it would be causing problems.
It's my understanding that any GAMEMODE limit check sends 'player' being checked, and the 'string' of whats being checked sbox_maxwire_<string>
I'm starting to troubleshoot on my end now.
Putting latest svn of wire on my dev server to see if I get same problem.
EDIT - Found the problem, and I've not even started up my server yet.
Working on a resolution. It deals with something I've not really used before, so be patient while I teach myself.
-
Release v2.1
- Fixed error mentioned by AtomicSpark (http://forums.ulyssesmod.net/index.php/topic,3864.msg16265.html#msg16265).
CheckLimit is a meta function for player... I was trying to call it as though it were literal.
Let me know if you see any more problems or have suggestions.
-
Hi,
I just did a fresh install of ULX and ULIB then put in UnoLimited v2.1. When I try to spawn a prop nothing happens, no matter whether im superadmin or regular player. Anyone else have this problem?
-
Hi,
I just did a fresh install of ULX and ULIB then put in UnoLimited v2.1. When I try to spawn a prop nothing happens, no matter whether im superadmin or regular player. Anyone else have this problem?
Is something supposed to happen when you spawn a prop? I think you're just supposed to be allowed more props.
-
Hi,
I just did a fresh install of ULX and ULIB then put in UnoLimited v2.1. When I try to spawn a prop nothing happens, no matter whether im superadmin or regular player. Anyone else have this problem?
Do you mean no prop spawns?
Check your server console make sure there's no lua error there.
Did you edit the file for your own groups? Even if not edited correctly, an error should appear.
Also, one thing to make sure... UnoLimited v2.1 requires ULib 2.(4!), which currently is SVN only.
If you're using the version downloaded from ulyssesmod.net/downloads, there is no full release there of 2.4 yet.
-
I'm getting a conflict while useing darkrp it allows people to spawn props in bannedprops.lua whether be admin or just a normal user this overrides it
-
DarkRP must be over riding Garry's commands like UnoLimited does.
If you'd like to attach the offending bannedprops.lua file, I'll have a look to see if there is an easy method to co-exist.
However, DarkRP is in most cases a coding nightmare (imo, of course, but many other developers here will agree).
I will make no guarantee that an update will be forthcoming, as UNoLimited was designed with Sandbox gamemode in mind.
Other gamemode authors could/should write thier own limit system.
-
sv_gamemodefunctions.lua deal with the actual spawning
-
As expected, there is no simplistic way.
Ask the authors of the DarkRP gamemode to include function limit checks like UNoLimited has within DarkRP.
That would be the easiest way. They already have much of the required function override like I use.
-
ok then thanks for trying
-
i was just wandering if someone knew if the uNolimited script was fixed. (the script allows admins and superadmins to have no sbox limits) or if any of you could fix it/make a new one that works.
Thanks.
-
Jay, it's not broken. Sandbox works fine (as far as I know).
Other gamemodes may over ride the GMod Sandbox sbox_ functionality.
Ask those gamemode authors to write in limit checking/changing.
-
ugh i know i put in wrong section btw.
why cant gmod just be SIMPLE!. anyway it works fine on a older version of ULX along with dark RP but if you upgrade ULX it no longer works. witch then led me to believe that it was ULX's problem
-
You know there are two versions, right?
(v1.x) for ULX release from our downloads page.
(v2.x) for SVN ULib and SVN ULX.
See first post.
-
yes. but kicking people crashes so ya
-
Jay, the code I use in UNoLimited has nothing to do with kicking people.
Do you get an error when kicking them that relates to actual UNoLimited files/code lines?
-
Doesn't work.
-
Doesn't work.
That doesn't help us or you in the slightest. What errors do you get? When doesn't it work? Did you make any changes? What other addons are you running? What gamemode?
-
Its a SpaceBuild2 gamemode. My friend set the superadmins group to -1 for unlimited and then tried spawning a bunch of props but hit the prop limit. He has ULib 2.40, Ulx, Ship cores, SBEP, SBMP, Wire SVN, Life Support 2, phx3, stargate, and a few others.
-
Do you know if Spacebuild uses it's own limit system? It's possible it's overriding UnoLimited.
Does your server start up console show that UnoLimited is loading?
Besides seeing it as a module file in the ULib // blah.lua // loading area, you should also see " *** UnoLimited Loaded ***"
-
I don't think spacebuild has its own limit system. Yes it does show *** UnoLimited Loaded ***
-
I've attempted to find Spacebuild2 download for testing, and haven't been able to.
Have a link for download or an SVN link for it?
-
no i dont know where my friend got the download for it. It's his server I was just posting it for him but he got it working.
-
Ok, glad he got it working... was there something I can change for SB2 servers to work?
I can't guarantee compatibility for every gamemode made, but I like to know just in case I can.
-
Any way to add functionality for specific users as well as groups?
And will there be future support for simple addition instead of multiplication?
Example: sbox_maxvehicles is 0, but for a certain group I want to allow them +2 vehicles. And of course if I try to use the current multiplication factor, anything multiplied by 0 is 0, therefore kaput.
Thanks!
-
Any way to add functionality for specific users as well as groups?
Absolutely!
Will I be doing it; no.
It would complicate the simplicity of this addon to have to keep track of players settings too.
And will there be future support for simple addition instead of multiplication?
Most likely no; but, it is something to perhaps consider.
Though I could write in a comparison that if sbox_whatever = 0 and multiplier > .99 then sbox_ = 1 else if multiplier = 2 then sbox = 2, then I'd have people complaining that they didn't want people with 1 or higher to have sbox 0 items.
Multiplication just works for majority of the design I had behind the check system.
Attempt tp write in more controls per player, per sbox item, per check, just cancels out the easy way this works.
-
I'm not really a script writing kind of person, not anymore. How difficult would it be to code the suggestions I've made, for someone with Java and PERL background experience and knowledge of scripting protocol?
-
My background before I learned Lua was, in chronological order, TRS80 BASIC, C64 BASIC, MS/PC DOS batch/command shell, PHP 4, tidbits of variants of *nix shells (tcsh, bash, ...), and just a good ability to read what some script is doing even if I don't know original construct.
So, since you have background, your 'addition' idea wouldn't be difficult. Shouldn't take more than a if/then comparison or two like I kind of outlined in my previous reply to your idea.
As for per player modification....well, that would not only take Lua experience, it would require a bit of experience with ULib and the UCL.
I don't mean to scare you away from it. It can just get complicated at times depending on what you're trying to do. Version 2 of this script uses so little ULib integration now.. it just looks up what group someone is in...then sets the limit multiplier if they belong to a predefined group or not.(1 if not)
-
C64 BASIC? You don't say! I started using a Commodore PET when I was only a few years old, moved up to C64 a year later, and QBASIC on an IBM not long after that.
I'll take a crack at making a per-user system, see if I can come up with my own little ULX/ULib addon within the next few weeks.
Thanks for all your help!
-
In order greatest to least recommended, the following should help you.
Lua 5.1 documentation - http://www.lua.org/manual/5.1/
ULib documentation - http://ulyssesmod.net/docs/index/General.html
Gmod Lua wiki - http://wiki.garrysmod.com/?title=Lua
If you have questions or want general help, use our Developers corner area. Most here would assist even in non-ULib related Lua.
Some would also help with SQL, and though fewer, maybe even some with other languages, scripting construct or not.
-
You probably wont consider this but this plugin disables bannedprops for every user in darkrp, I know ulx was not intended to be used in rp but it is being used by a lot of people and I would love to use this plugin.
-
Not urgent IMO but just reporting that uRestrict breaks the svn version of this. It makes it so that you can't spawn anything.
-
disables bannedprops
ULX as an admin mod was meant for any game mode.
Certain features of ULX, and many of it's plugins, were meant for Sandbox.
Whatever author of the bannedprops feature within darkrp should also be able to write in a prop limit adjustment depending on whatever system darkrp uses to control it's class/group/team/job/whatever system.
uRestrict breaks the svn version of this.
Thanks for the info.
Jay asked me if he could include this feature in URestrict... guess he did.
I've not looked at URestict code much... perhaps he (should include/included) a way to use one over the other?
At the least if his works, guess you don't need UnoLimited.
URestrict is meant to be all inclusive... UnoLimited was simpler in scope.
-
Does this let you set prop limits to groups?
Great Mod!
-
UnoLimited v2 (ENHANCED) ;
* Requires ULib 2.4+
* Allows you to set a multiplier (0 to 2, can used decimals .75 , 1.5, etc) for each group you wish to control.
* Defaults to 1 (standard limit) if you do not set up a custom group.
* Allows setting a group 'unlimited' using "-1"
-
little problem i put this on my server and now nobody can spawn anything i need some serious help
-
Are you running Sandbox gamemode?
What other prop limiting mods?
What errors on server and or client when someone attempts to spawn something?
What version of ULX?
What version of UnoLimited (one is for SVN only, one isn't)
I/We/Anyone can't help you with the little detail you give.
-
no im running a darkrp server
The other prop protection i have is falcos prop protection and i have an allowed list on the server
there is no error nothing happens
The latest version
unolimited version 2
-
Several users of DarkRP state this conflicts with it.
DarkRP apparently uses some of the same functionality UNoLimited uses for it's banned props list.
Since UNoLimited is meant for Sandbox, you may wish to ask the author(s) of DarkRP to write in more limit functionality.
-
im running UNoLimited v2.1 and i cant get it to work.
There is NO error supplied since i cannot find one, or simply, there isnt one.
[ULIB] Loading SHARED module: UnoLimited.lua
[ULIB]*** UnoLimited v2.1 Ready! *******
Im running sandbox, and i test it by going to the proplimit, and not being able to go over it.
Can i get some help? :S
-
How are you testing? Listen or Dedicated server?
(Garry's mod doesn't limit any sbox_<item> in singleplayer)
The indication you post that it's loading is from a client side (which is where actual Gmod limit checks occur).
Though you won't get a "Ready" message after, does it load on the server according to the "[ULIB] Loading SHARED module: UnoLimited.lua" message?
Does ULib see you as one of the groups in UNoLimited?
Did you edit the file's group settings?
Are you running any other mod that monitors limits? (many anti-spam scripts use a similiar method used in this)
-
Dedicated Server.
And i do get that messege.
ULib DOES see me AND others as the groups in Unolimited.
Yes i edited it, il post the code below.
No im not running any other mods that monitor limits. OTHER Than ULX ofc.
if not ULib then Msg( "\n ** UnoLimited v2+ REQUIRES ULib v2.4+ .. Aborting\n\n") return else
Msg( "[ULIB]*** UnoLimited v2.1 Ready! *******\n")
local UNL = { }
-- ---------------------------------------------------------
-- Name: UnoLimited
-- Author: Garry 98.50% - Megiddo .75% - JamminR .75% - A "Team Ulysses idea
-- Desc: Allows defined groups to spawn past the sbox_max limits.
-- v1 release to Ulysses - v1.1 - Fixed sents (evil garry)
-- v2 Added group control - ULib 2.4+ required
-- ---------------------------------------------------------
-- The numbers are a percentage and will be multiplied to the actual sbox limit.
-- Range is 0 (0 percent) to 2 (200 percent). Setting a group to 0 will limit that group to nothing.
-- Example - Server has "sbox_maxprops 400" limit. .5 percent of that is 200 props.
-- Any group = .5 will have a 200 prop limit. However, 1.5 would give them 600
-- NOTE!!! - Any decimals will be rounded DOWN to nearest whole number.
-- If you allow sbox 1 of something...any multiplier below 1 will set that groups limit to 0. Any not 2 will be 1.
-- All groups not specified get 'standard' limit set in your server.cfg.
-- Any group set to -1 becomes unlimited
-- ==================
-- Edit the following table. Add groups as necessary. Add comma at end of previous line if additional added.
UNL.groups = {
superadmin = -1,
admin = 3,
vip = 2,
respected = 1.5
}
-- ------- Please ask for Team Ulysses assistance editing below this line ----------------
local function GetUnoLimit ( ply, str )
local gmulti = UNL.groups[ ply:GetUserGroup() ]
local a
if gmulti then
if gmulti == -1 then return gmulti end
if ( gmulti < 0 || gmulti > 2 ) then
ULib.error( string.format( "* UNoLimited - Group %q multiplier %q out of range(0 to 2)...setting to 1", ply:GetUserGroup(), gmulti ) )
gmulti = 1
end
a = math.floor( ( gmulti * server_settings.Int( "sbox_max"..str, 0 ) ) )
else
a = server_settings.Int( "sbox_max"..str, 0 )
end
return a
end
local function LimitReachedProcess( ply, str )
-- Always allow in single player
if (SinglePlayer()) then return true end
local c = GetUnoLimit ( ply, str )
-- Always allow if multiplier is -1
if c == -1 then return true end
if ( ply:GetCount( str ) < c || c < 0 ) then return true end
ply:LimitHit( str )
return false
end
local function init()
/*---------------------------------------------------------
Name: gamemode:PlayerSpawnRagdoll( ply, model )
Desc: Return true if it's allowed
---------------------------------------------------------*/
function GAMEMODE:PlayerSpawnRagdoll( ply, model )
return LimitReachedProcess( ply, "ragdolls" )
end
/*---------------------------------------------------------
Name: gamemode:PlayerSpawnProp( ply, model )
Desc: Return true if it's allowed
---------------------------------------------------------*/
function GAMEMODE:PlayerSpawnProp( ply, model )
return LimitReachedProcess( ply, "props" )
end
/*---------------------------------------------------------
Name: gamemode:PlayerSpawnEffect( ply, model )
Desc: Return true if it's allowed
---------------------------------------------------------*/
function GAMEMODE:PlayerSpawnEffect( ply, model )
return LimitReachedProcess( ply, "effects" )
end
/*---------------------------------------------------------
Name: gamemode:PlayerSpawnVehicle( ply, model, vname, vtable )
Desc: Return true if it's allowed
---------------------------------------------------------*/
function GAMEMODE:PlayerSpawnVehicle( ply, model, vname, vtable )
return LimitReachedProcess( ply, "vehicles" )
end
/*---------------------------------------------------------
Name: gamemode:PlayerSpawnNPC( ply, npc_type )
Desc: Return true if player is allowed to spawn the NPC
---------------------------------------------------------*/
function GAMEMODE:PlayerSpawnNPC( ply, npc_type, equipment )
return LimitReachedProcess( ply, "npcs" )
end
local meta = FindMetaTable( "Player" )
// Return if there's nothing to add on to
if (!meta) then return end
function meta:CheckLimit( str )
// No limits in single player
if (SinglePlayer()) then return true end
local c = GetUnoLimit ( self, str )
if ( c < 0 ) then return true end
if ( self:GetCount( str ) > c-1 ) then self:LimitHit( str ) return false end
return true
end
end
hook.Add( "Initialize", "LimitInitilize", init )
end
-
Are you as a superadmin hitting a limit?
Your admin would definitely hit normal limit.
-- Range is 0 (0 percent) to 2 (200 percent).
Try changing your admin group to 2, not 3
You can't have more than 2 times the sbox_limit, if you do, it defaults to normal (1).
Your server console should have been saying an error every time an admin tried to spawn something.
-
As a superadmin i was always hitting the limit, and so were my admins. It may be fixed now, i had a little tinker myself, il post back in this one if it doesnt work still ;)
Thanks for your help.
-
Uh, clarify "little tinker"
Words like that when coding often alarm me.
-
well its fixed now, heh, no need to get worried!
heres the code, i gave it to a friend after i looked and couldnt find anything wrong, not sure whats different but im sure you'll know.
if not ULib then Msg( "\n ** UnoLimited v2+ REQUIRES ULib v2.4+ .. Aborting\n\n") return end
Msg( "[ULIB]*** UnoLimited v2.1 Ready! *******\n")
local UNL = { }
-- ---------------------------------------------------------
-- Name: UnoLimited
-- Author: Garry 98.50% - Megiddo .75% - JamminR .75% - A "Team Ulysses idea
-- Desc: Allows defined groups to spawn past the sbox_max limits.
-- v1 release to Ulysses - v1.1 - Fixed sents (evil garry)
-- v2 Added group control - ULib 2.4+ required
-- ---------------------------------------------------------
-- The numbers are a percentage and will be multiplied to the actual sbox limit.
-- Range is 0 (0 percent) to 2 (200 percent). Setting a group to 0 will limit that group to nothing.
-- Example - Server has "sbox_maxprops 400" limit. .5 percent of that is 200 props.
-- Any group = .5 will have a 200 prop limit. However, 1.5 would give them 600
-- NOTE!!! - Any decimals will be rounded DOWN to nearest whole number.
-- If you allow sbox 1 of something...any multiplier below 1 will set that groups limit to 0. Any not 2 will be 1.
-- All groups not specified get 'standard' limit set in your server.cfg.
-- Any group set to -1 becomes unlimited
-- ==================
-- Edit the following table. Add groups as necessary. Add comma at end of previous line if additional added.
UNL.groups = {
superadmin = -1,
admin = -1,
vip = 2,
respected = 1.5
}
-- ------- Please ask for Team Ulysses assistance editing below this line ----------------
local function GetUnoLimit ( ply, str )
local gmulti = UNL.groups[ ply:GetUserGroup() ]
local a
if gmulti then
if gmulti == -1 then return gmulti end
if ( gmulti < 0 || gmulti > 2 ) then
ULib.error( string.format( "* UNoLimited - Group %q multiplier %q out of range(0 to 2)...setting to 1", ply:GetUserGroup(), gmulti ) )
gmulti = 1
end
a = math.floor( ( gmulti * server_settings.Int( "sbox_max"..str, 0 ) ) )
else
a = server_settings.Int( "sbox_max"..str, 0 )
end
return a
end
local function LimitReachedProcess( ply, str )
-- Always allow in single player
if (SinglePlayer()) then return true end
local c = GetUnoLimit ( ply, str )
-- Always allow if multiplier is -1
if c == -1 then return true end
if ( ply:GetCount( str ) < c || c < 0 ) then return true end
ply:LimitHit( str )
return false
end
/*---------------------------------------------------------
Name: gamemode:PlayerSpawnRagdoll( ply, model )
Desc: Return true if it's allowed
---------------------------------------------------------*/
local function PlayerSpawnRagdoll( ply, model )
return LimitReachedProcess( ply, "ragdolls" )
end
hook.Add("PlayerSpawnRagdoll", "UnoLimited", PlayerSpawnRagdoll)
/*---------------------------------------------------------
Name: gamemode:PlayerSpawnProp( ply, model )
Desc: Return true if it's allowed
---------------------------------------------------------*/
local function PlayerSpawnProp( ply, model )
return LimitReachedProcess( ply, "props" )
end
hook.Add("PlayerSpawnProp", "UnoLimited", PlayerSpawnProp)
/*---------------------------------------------------------
Name: gamemode:PlayerSpawnEffect( ply, model )
Desc: Return true if it's allowed
---------------------------------------------------------*/
local function PlayerSpawnEffect( ply, model )
return LimitReachedProcess( ply, "effects" )
end
hook.Add("PlayerSpawnEffect", "UnoLimited", PlayerSpawnEffect)
/*---------------------------------------------------------
Name: gamemode:PlayerSpawnVehicle( ply, model, vname, vtable )
Desc: Return true if it's allowed
---------------------------------------------------------*/
local function PlayerSpawnVehicle( ply, model, vname, vtable )
return LimitReachedProcess( ply, "vehicles" )
end
hook.Add("PlayerSpawnVehicle", "UnoLimited", PlayerSpawnVehicle)
/*---------------------------------------------------------
Name: gamemode:PlayerSpawnNPC( ply, npc_type )
Desc: Return true if player is allowed to spawn the NPC
---------------------------------------------------------*/
local function PlayerSpawnNPC( ply, npc_type, equipment )
return LimitReachedProcess( ply, "npcs" )
end
hook.Add("PlayerSpawnNPC", "UnoLimited", PlayerSpawnNPC)
local meta = FindMetaTable( "Player" )
// Return if there's nothing to add on to
if (!meta) then return end
function meta:CheckLimit( str )
// No limits in single player
if (SinglePlayer()) then return true end
local c = GetUnoLimit ( self, str )
if ( c < 0 ) then return true end
if ( self:GetCount( str ) > c-1 ) then self:LimitHit( str ) return false end
return true
end
-
Hmm. I see big differences, but, I'm not sure how well it plays with others (other mods that would use gamemode call)
Also, I'm not sure how it's working at all, since he's using the same uniqueid name for every hook.
I'm not questioning too much if it works for you...and it gives me some ideas
-
Upon further review... the method your friend used will break many other functions anytime a limit is reached/false is returned.
(and actually, even true being returned will break others)
I understand the logic, but using hooks breaks other scripts, including but not limited ULX logging, prop protect, many others.
-
What would a fix be then? I have the same problem with phoenixf129, prop limits are not being obeyed. -1 to groups doesn't do a thing (not sure about other values). Oh, I'm on dedicated server as well.
-
When did this start for you?
You post in other threads, all of which people have posted in problems that I feel are related to Garry's latest update.
If you are using any other mod which overrides the Garry's mod functions for prop count like we do, and they return something before this script does, it will break. This includes Urestrict, which uses very similar code. (Which, Jay asked if he could include in Urestrict..made sense...restrictions)
Garry made changes to the way lua files are downloaded that are either 1) broken or 2) none of us have learned to use yet.
Since datastream is also problematic, and ULib relies on datastream, and the SVN version of my code relies on ULib SVN, it may be some time before it's fixed...we have to wait on Garry.
-
I can't say exactly. I had exams and I haven't touched my garry's mod server for 2 months. So I simply started hosting again, update svns, servers and just start playing. I'll try disabling URestrict. However, UPS starts working again, which I am just about to update my post in that thread over there. Thanks for the input.
-
Is this addon still working for people?
Also, is this supposed to be spelt wrong
hook.Add( "Initialize", "LimitInitilize", init )
-
Other than conflict with any other addon that also uses the same method to limit Gmod spawn limits (DarkRP prop ban, URestrict, few others), I honestly don't know.
As for spelling, probably but not sure. The misspelled word is supposed to be unique. I could see purposely not spelling it right so that it would be.
Are you having particular trouble with it, or just asking before you try?
There has been quite a bit of time since I last tried it, and several Gmod updates since... always possible something in it was broken over time.
-
It's working fine for me!
-
Also, is this supposed to be spelt wrong
hook.Add( "Initialize", "LimitInitilize", init )
I'm assuming you mean the thing in bold. And to tell the truth, it doesn't really have to be something specific.
If you're getting what you think are hook conflicts, you can change that to anything. For best effect, let your fingers have a spasm over your keyboard, like this: ktyhjrdhykrfgjhnrekjyhejdhgkure
(alphanumeric only, so only letters and numbers are OK. I think)
-
Did some debugging on the Linux version of the Garry's Mod dedicated server. Turns out that the ulib folder in UnoLimited_v2/lua/ULib/modules/ needs to be lowercase. I went ahead and lowercased everything for good practice. Just a heads up!
[EDIT-JamminR] -Post attachment removed - First (release) post updated. (http://forums.ulyssesmod.net/index.php/topic,3864.0.html) New version #. Thanks AtomicSpark.
-
I stuck this on our server, but upon trying to spawn something, a lua error appears and the prop does not spawn. I forgot what the exact error said...something about spawning, for sure.
Fixes?
-
Do you have ULX/ULib SVN version? As in you downloaded it with TortoiseSVN or something similar? If so, make sure you're using the UnoLimited V2 stated in the OP. If not, try the UnoLimited V1.1.
-
Indeed, make sure you have the proper version as DiscoBiscuit said. v1.x does not require ULib.
v2.x is for (currently) SVN versions of ULib only.
An exact error would really be helpful.
Also, as several other posts in this thread discuss, DarkRP (or any edit of it) overrides the same command this uses for it's prop banning system.
Not only that, the DarkRP version (at one time? no idea if now) of Prop banning doesn't allow other scripts to continue if the prop is allowed.
URestrict will also conflict, as it's prop limiting system uses same idea from this release (but also requires SVN ULib)
-
Anyone determine a fix? It does absolutely nothing when I install. No error messages and it restricts everyone to the same settings
-
So far, no proven error with the program has been shown by anyone.
However, it has been many Gmod and even ULib updates since any posted in this thread.
Some things to remember I've learned over the past few pages;
Can't test it in Single player.
Gmod doesn't run the limit check function in SP. (This uses modified functions of those, but, they don't run either)
UNoLimited version - v1 requires no ULib. If using ULib, doesn't matter what version
v2+ requires latest ULib SVN for group checking.
Configuration;
Limits - I've seen several try to set 'limits' for v2 to more than 2x. Can't do it. UNolimited falls back to normal limit if number is higher than 2.
Groups - If you're using custom groups (owner for example, for some reason, seems to be popular), you'd need to add it to your v2 configuration.
If not using v2, well, I forget how I coded it, but I'm pretty sure you need to actually be superadmin or admin in Gmod's 'isusergroup' function.
DarkRP - Doesn't work with this 95+% of the time. Last I saw, DarkRP uses the same Gmod functions for it's prop ban system that this does. As I've suggested before, if using DarkRP, ask the authors of it to extend it's prop banning system to include limit checking system for diff group levels. (It's really not hard to do)
URestrict - Latest versions of Urestrict include same/tweaked code from UNoLimited. They'll fight each other. (Though at this time, many reports of URestrict being broken exist, and we've not seen much, if any, of Jay lately. We hope he's ok)
Now, with all the above checked... try to give some more detail. Using which version of UNoLimited? v1 is the simplest.
If your not using a conflicting gamemode or mod (that use the same functions this does), v1 should work for you as long as Gmod sees you as an admin or superadmin.
If using v2, does your server console at start up show it loading when ULib is showing shared module startup?
No errors? I'd find that odd. Even an error at startup should occur if a problem is occurring. Conflicting mods would show one or the other mod hooks failing on the server then being removed, usually the first time a prop is spawned.
-
Full dump file attached and my config for unolimited. Its v2.2 and no I don't get any errors. I have also experienced issues with URestrict (no I didn't have both installed at the same time). All ULX addons I have in folder: XGUI, Unolimited, and UClip (doesn't work as well)
-
Didn't look at other stuff yet, but, let's clarify this first;
Do you want your superadmins to be able to spawn nothing?
From my config notes
-- Range is 0 (0 percent) to 2 (200 percent). Setting a group to 0 will limit that group to nothing.
So is your complaint that it's not limiting at all?
All groups hit the limit at your server setting no matter what group?
Also, though it's possible I just don't see it, I find no message of ULib or UNoLimited loading in your condump.
(Though, ULX does indeed load, presume it's there somewhere)
-
I don't use superadmin. Admin has about the same rights as a normal superadmin just not certain allow and deny settings. I did that so Owner (me) would have the most permissions.
And correct all players are hitting the limits
-
Sorry that I'm bumping this EXTREMELY old topic, but how can I add SENTs to the list? I can't spawn SENTs as superadmin / custom ranks, also... people can still spawn guns with LEFT mouse while 'sbox_maxsents' = '0'
-
Ugh. <censor> Garry. He can't make up his mind.
I didn't know Garry had added back sbox_maxsents ( http://www.facepunch.com/threads/1095234-gmod_game-Added-sbox_maxsents )
He removed it in 2008. (Can't find changelog, but I actually posted about it http://forums.ulyssesmod.net/index.php/topic,3327.msg10015.html#msg10015 )
So, I may or may not update this. Odd thing is, I didn't think it would allow you to proceed if set to 0.
Might research, might not.
Look within the code, it may still be commented out (has -- in front of lines regarding maxsents)
See also - newer active release here called URS. Might have same ability.
EDIT
Open your unolimited.lua. Find all the commands that look similar to below. Add code below after an 'end' but before a next 'function' of those similar looking code bits. Not tested, may not work, but, is basically same i used to have before 'fixing' it in 2008 after Garry removed sbox_maxsents.
/*---------------------------------------------------------
Name: gamemode:PlayerSpawnSENT( ply, name )
Desc: Return true if player is allowed to spawn the SENT
---------------------------------------------------------*/
function GAMEMODE:PlayerSpawnSENT( ply, name )
return LimitReachedProcess( ply, "sents" )
end
-
This is what the code contains now, before I made this post
if not ULib then Msg( "\n ** UnoLimited v2+ REQUIRES ULib v2.4+ .. Aborting\n\n") return else
Msg( "[ULIB]*** UnoLimited v2.1 Ready! *******\n")
local UNL = { }
-- ---------------------------------------------------------
-- Name: UnoLimited
-- Author: Garry 98.50% - Megiddo .75% - JamminR .75% - A "Team Ulysses idea
-- Desc: Allows defined groups to spawn past the sbox_max limits.
-- v1 release to Ulysses - v1.1 - Fixed sents (evil garry)
-- v2 Added group control - ULib 2.4+ required
-- ---------------------------------------------------------
-- The numbers are a percentage and will be multiplied to the actual sbox limit.
-- Range is 0 (0 percent) to 2 (200 percent). Setting a group to 0 will limit that group to nothing.
-- Example - Server has "sbox_maxprops 400" limit. .5 percent of that is 200 props.
-- Any group = .5 will have a 200 prop limit. However, 1.5 would give them 600
-- NOTE!!! - Any decimals will be rounded DOWN to nearest whole number.
-- If you allow sbox 1 of something...any multiplier below 1 will set that groups limit to 0. Any not 2 will be 1.
-- All groups not specified get 'standard' limit set in your server.cfg.
-- Any group set to -1 becomes unlimited
-- ==================
-- Edit the following table. Add groups as necessary. Add comma at end of previous line if additional added.
UNL.groups = {
owner = -1,
superadmin = -1,
admin = 2,
operator = 1.5
}
-- ------- Please ask for Team Ulysses assistance editing below this line ----------------
local function GetUnoLimit ( ply, str )
local gmulti = UNL.groups[ ply:GetUserGroup() ]
local a
if gmulti then
if gmulti == -1 then return gmulti end
if ( gmulti < 0 || gmulti > 2 ) then
ULib.error( string.format( "* UNoLimited - Group %q multiplier %q out of range(0 to 2)...setting to 1", ply:GetUserGroup(), gmulti ) )
gmulti = 1
end
a = math.floor( ( gmulti * server_settings.Int( "sbox_max"..str, 0 ) ) )
else
a = server_settings.Int( "sbox_max"..str, 0 )
end
return a
end
local function LimitReachedProcess( ply, str )
-- Always allow in single player
if (SinglePlayer()) then return true end
local c = GetUnoLimit ( ply, str )
-- Always allow if multiplier is -1
if c == -1 then return true end
if ( ply:GetCount( str ) < c || c < 0 ) then return true end
ply:LimitHit( str )
return false
end
local function init()
/*---------------------------------------------------------
Name: gamemode:PlayerSpawnRagdoll( ply, model )
Desc: Return true if it's allowed
---------------------------------------------------------*/
function GAMEMODE:PlayerSpawnRagdoll( ply, model )
return LimitReachedProcess( ply, "ragdolls" )
end
/*---------------------------------------------------------
Name: gamemode:PlayerSpawnProp( ply, model )
Desc: Return true if it's allowed
---------------------------------------------------------*/
function GAMEMODE:PlayerSpawnProp( ply, model )
return LimitReachedProcess( ply, "props" )
end
/*---------------------------------------------------------
Name: gamemode:PlayerSpawnEffect( ply, model )
Desc: Return true if it's allowed
---------------------------------------------------------*/
function GAMEMODE:PlayerSpawnEffect( ply, model )
return LimitReachedProcess( ply, "effects" )
end
/*---------------------------------------------------------
Name: sents
Desc: Return true if it's allowed
---------------------------------------------------------*/
function GAMEMODE:PlayerSpawnEffect( ply, name )
return LimitReachedProcess( ply, "sents" )
end
/*---------------------------------------------------------
Name: gamemode:PlayerSpawnVehicle( ply, model, vname, vtable )
Desc: Return true if it's allowed
---------------------------------------------------------*/
function GAMEMODE:PlayerSpawnVehicle( ply, model, vname, vtable )
return LimitReachedProcess( ply, "vehicles" )
end
/*---------------------------------------------------------
Name: gamemode:PlayerSpawnNPC( ply, npc_type )
Desc: Return true if player is allowed to spawn the NPC
---------------------------------------------------------*/
function GAMEMODE:PlayerSpawnNPC( ply, npc_type, equipment )
return LimitReachedProcess( ply, "npcs" )
end
local meta = FindMetaTable( "Player" )
// Return if there's nothing to add on to
if (!meta) then return end
function meta:CheckLimit( str )
// No limits in single player
if (SinglePlayer()) then return true end
local c = GetUnoLimit ( self, str )
if ( c < 0 ) then return true end
if ( self:GetCount( str ) > c-1 ) then self:LimitHit( str ) return false end
return true
end
end
hook.Add( "Initialize", "LimitInitilize", init )
end
But this doesn't seem to work.
If you might want to try what happens, add me to Steam, steam://friends/add/cyberuben (copy link and paste in browser), and then you can see what happens yourself.
-
In my previous post I gave specific code for you to add.
You've apparently edited on your own and now have function gamemode:PlayerSpawnEffect twice.
Don't add your own, add what example I gave.
-
All, please don't PM me. So far, my inbox is full of questions that will help everyone. I dare say the only reason I've ever gotten a private that should have been private was to research what the author believed to be a possible ULX exploit (it wasn't, turned out to be the game mode they were using)
A concerned citizen writes;
hi im currently working on making a server am using Exsto for admin control and so on , i was wondering if UnoLimited 1.1 would work with the current admin mod so i can set limits for superadmins and myself the owner. please pm me or send me an email with your answer. thanks in advance!
First; Our condolences that you are using another admin mod. Your choice, but still, our condolences :)
Second; UnoLimited v1 uses Garry's IsSuperadmin and IsAdmin for its group checks.
These are standard functions written for every developer to use for any mod/code.
If Exsto's owner isn't detected by either one of those functions, then no, it won't detect the owner group. As for Exsto's admin group, as long as it is a actual group name and not a team name, then yes, it will detect admin.
-
This comes up when I try to use it on my server:
[ERROR] addons/unolimited_v2/lua/ulib/modules/unolimited.lua:52: attempt to call global 'SinglePlayer' (a nil value)
1. Call - addons/unolimited_v2/lua/ulib/modules/unolimited.lua:52
2. Spawn_NPC - gamemodes/sandbox/gamemode/commands.lua:406
3. unknown - gamemodes/sandbox/gamemode/commands.lua:454
4. unknown - lua/includes/modules/concommand.lua:69
-
Someone else is more than welcome to convert this to Gmod13.
I won't be in the foreseeable future.
-
NOTE - NexBR converted to GM13 and (at the time) modern ULib format.
Please see update in our releases section. I split the topic from his post here to a new thread.
http://forums.ulyssesmod.net/index.php/topic,6720.0.html (http://forums.ulyssesmod.net/index.php/topic,6720.0.html)
Thanks Nexbr!