General > Developers Corner

DarkRP re: Urestrict - and anything else DarkRP breaks

<< < (3/5) > >>

JamminR:
Ugh. The more I see darkRP code, the more I cringe.
Drake, the DarkRP advice is far beyond the scope of this discussion for URestrict.
I'm splitting the conversation to the Developer's corner forum area.

atomicspark:

--- Quote from: jay209015 on September 06, 2009, 09:01:55 AM ---Ok, after a lot of research, I found the problem and came up with a solution.

In the attachment  there are three .lua files.
     physgunlimiter.lua
     sv_gamemode_functions.lua
     sv_init.lua

physgunlimiter.lua and sv_gamemode_functions.lua both go into your <server>/gamemode/DarkRP/gamemode folder and when prompted to replace say yes.
sv_init. lua goes into your <server>/gamemode/DarkRP/gamemode/SPropProtection and when prompted to replace say yes.

::EDIT::
For the record, this wasn't the fault of URestrict, the coder of DarkRP made the beginner mistake of returning true instead of just returning so other scripts don't get broken.

--- End quote ---

Just in case you didn't know this already, Garry's Mod has a "physgun_limited" console command that when set to "1", protects world entities. I have only tested it on doors, but it seems to work very well. It doesn't even let you attempt to grab it, almost like the door isn't there. It's a nice feature to have enabled just in case your prop protection or gamemode script decides to implode.

jay209015:

--- Quote from: Drakehawke on September 07, 2009, 10:23:43 AM ---...

--- Code: ---...
end
return GAMEMODE:CanTool(ply, trace, tool)
end
hook.Add("CanTool", "FPP.Protect.CanTool", FPP.Protect.CanTool)
--- End code ---

...

--- End quote ---
     - Is this just me or is he calling a hook within itself?

--- Quote from: JamminR on September 07, 2009, 11:38:53 AM ---Ugh. The more I see darkRP code, the more I cringe.
...

--- End quote ---
     - Agree 100%

atomicspark:
Ulysses RP?

I never understood the interest in RP gamemodes. It really just ends up being a cost system applied to weapons.

Drakehawke:
Will URestrict still work with this hook within itself, or do I still need to make it just return?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version