Author Topic: Custom Prop Limits?  (Read 4396 times)

0 Members and 1 Guest are viewing this topic.

Offline someone920

  • Newbie
  • *
  • Posts: 47
  • Karma: 3
Custom Prop Limits?
« on: May 09, 2010, 08:47:48 AM »
I'm trying to find a way to get players to have custom props limits so admins don't have to change prop limits for entire groups or the entire server. Do you think it might be possible with MySQL or might it be easier to include a file in the server files?

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Custom Prop Limits?
« Reply #1 on: May 09, 2010, 06:50:10 PM »
"Per Player" limits?
Wow. That's really wanting microscopic control.
It could be done either way you suggested. SQL is probably better for more than, 5, in my opinion.
How many different players could you see wanting different limits for?
Less than 5? Less than 10?
More than 10?
Among those <x> amount of players, would they all have the same server/ulx access/command levels?
If the same, and less than say 5, I'd just make 5 new groups, set UnoLimited to allow certain prop amounts for each group, then add each player to that group.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline someone920

  • Newbie
  • *
  • Posts: 47
  • Karma: 3
Re: Custom Prop Limits?
« Reply #2 on: May 10, 2010, 03:18:35 PM »
What I was thinking is people could buy more or less limits or new commands with ingame cash. This would almost be like an rp build, just with only the money part of rp. I've got the command part somewhat figured out, but i'm totally stumped on how this would work with prop limits.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Custom Prop Limits?
« Reply #3 on: May 10, 2010, 09:09:38 PM »
Player.CheckLimit
For UnoLimited, and I believe URestricts version of it, we used modified Gmod code...we overrode the normal checklimit and inserted group checks.
As long as you figure out how to load/store each players resources, SQL or otherwise, you can check code.garrysmod.com for the actual Checklimit function, modify it to match your own 'player_amount_prop' level vars.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline someone920

  • Newbie
  • *
  • Posts: 47
  • Karma: 3
Re: Custom Prop Limits?
« Reply #4 on: May 11, 2010, 03:03:33 PM »
Sweet! Thanks!

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Custom Prop Limits?
« Reply #5 on: May 17, 2010, 09:30:47 PM »
Just saw this. No idea how easily/difficult it could be modified for ulx commands.
Actually, it's Lua... anything can be done depending on skill and experience.
http://www.facepunch.com/showthread.php?t=933261
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline someone920

  • Newbie
  • *
  • Posts: 47
  • Karma: 3
Re: Custom Prop Limits?
« Reply #6 on: May 19, 2010, 04:23:31 PM »
You have no idea how much time you saved me! I will love you forever.  :P