ULX

Author Topic: DarkRP re: Urestrict - and anything else DarkRP breaks  (Read 10186 times)

0 Members and 1 Guest are viewing this topic.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: DarkRP re: Urestrict - and anything else DarkRP breaks
« Reply #15 on: September 08, 2009, 03:51:33 PM »
Drake, difficult to really know.
Worth trying.
Problem is, with the way DarkRP is coded, if you change it to only 'return', you may break it or other scripts.
Tip for all Gmod lua coders - returning anything, even 'true', breaks 99% of most Gmod standard hooks.
It will in most cases prevent any other hook of the same type in other scripts from running.
Yes, sometimes that is wanted (returning false, etc), but in most you don't.

There are exceptions to this rule of course, but, not many.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Drakehawke

  • Newbie
  • *
  • Posts: 38
  • Karma: 0
    • Serious Roleplaying Hell
Re: DarkRP re: Urestrict - and anything else DarkRP breaks
« Reply #16 on: September 17, 2009, 02:45:51 PM »
Been very busy lately, and ive finally got round to trying to fix this.

Making all the CanTool functions not return at all, URestrict still dosn't work.
Making all the CanTool functions just return, URestrict Works :), Prop Protection breaks completely :-\.

Any ideas?

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: DarkRP re: Urestrict - and anything else DarkRP breaks
« Reply #17 on: September 17, 2009, 04:09:53 PM »
Any ideas?

Find a better coded RP script? :/
Sorry, DarkRP just isn't coded well, and has been rehashed so many times by so many attempts of people who thought they could do better, that often didn't I'm betting, that I'm not sure a version exists that doesn't have major flaw somewhere.

Is there one out there?
I've no idea.

What Prop protect do you use? Are you talking of DarkRPs?
Did you edit your prop protect too?
Returning something sometimes is a good thing...just not as often as many seem to do.
« Last Edit: September 17, 2009, 04:11:34 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Drakehawke

  • Newbie
  • *
  • Posts: 38
  • Karma: 0
    • Serious Roleplaying Hell
Re: DarkRP re: Urestrict - and anything else DarkRP breaks
« Reply #18 on: September 18, 2009, 08:03:52 AM »
Im using FPP (Falco's Prop Protection), Falco being the current updater of it. It comes with the DarkRP SVN, but you can download it seperately.
I have edited it as Jay told me to make any CanTool function not return true.
A guy on the DarkRP thread told me that he had got URestrict working without having to edit FPP, and only the CanTool in sv_gamemode_functions, this is the next thing im going to try.

Offline Drakehawke

  • Newbie
  • *
  • Posts: 38
  • Karma: 0
    • Serious Roleplaying Hell
Re: DarkRP re: Urestrict - and anything else DarkRP breaks
« Reply #19 on: September 18, 2009, 10:38:33 AM »
Nevermind all of this, Falcos about to release an update to DarkRP with the ability to restrict tools to admins or superadmins.

Offline jay209015

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 934
  • Karma: 62
    • Dev-Solutions
Re: DarkRP re: Urestrict - and anything else DarkRP breaks
« Reply #20 on: September 18, 2009, 10:43:12 AM »
You know Falco's steam nick?
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 Drakehawke

  • Newbie
  • *
  • Posts: 38
  • Karma: 0
    • Serious Roleplaying Hell
Re: DarkRP re: Urestrict - and anything else DarkRP breaks
« Reply #21 on: September 18, 2009, 10:47:27 AM »
No, I don't. But whatever he does to make his system work, should also automatically make URestrict work.
http://www.facepunch.com/showthread.php?t=778336&page=21
Thats the DarkRP thread, you can speak to him through there, his name on Facepunch is FPtje.
« Last Edit: September 18, 2009, 10:52:27 AM by Drakehawke »

Offline Jay

  • Newbie
  • *
  • Posts: 16
  • Karma: -2
  • Awesome
Re: DarkRP re: Urestrict - and anything else DarkRP breaks
« Reply #22 on: October 30, 2009, 11:48:37 PM »
i think changing:
Quote
ur.config["loadouts"] = true
to
Quote
ur.config["loadouts"] = false

The loadouts seem to be giving me the problems. like   if you disable them all with the GUI in the game     people can spawn guns     but   with it enabled     no one spawned with keys, arrest stick, and so on.    disabling this may be the trick   ill let you know tomorow



not sure on that one.
« Last Edit: October 30, 2009, 11:51:11 PM by Jay »

Offline jay209015

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 934
  • Karma: 62
    • Dev-Solutions
Re: DarkRP re: Urestrict - and anything else DarkRP breaks
« Reply #23 on: October 31, 2009, 12:25:52 AM »
That wont help at all, it would just reverse the effects of disabling it in the gui. To make it work, you have to add the keys, arrest stick, .... to the loadouts.
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