General > Developers Corner

DarkRP re: Urestrict - and anything else DarkRP breaks

<< < (4/5) > >>

JamminR:
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.

Drakehawke:
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?

JamminR:

--- Quote from: Drakehawke on September 17, 2009, 02:45:51 PM ---Any ideas?

--- End quote ---

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.

Drakehawke:
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.

Drakehawke:
Nevermind all of this, Falcos about to release an update to DarkRP with the ability to restrict tools to admins or superadmins.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version