DarkRP No sbox_noclip

I Have A DarkRP server with ulx as my admin mod, i have removed fadmin due to it being buggy with ulx, i am superadmin on the server and noclip isnt working.

What Have I Done To Try And Fix This:

I have changed the sbox_noclip 0 to sbox_noclip 1 and still nothing, i have changed my noclip key in options and still nothing.
I can get it so that when i press v (for noclip) i fly forward but then i shoot back to where i pressed v everytime i press it.

Does Anyone Know Of A Way To Fix This ?? I Would Really Appreciate it :slight_smile:

Have you tried using !noclip in chat or ulx noclip <your name>?

Name not needed.

yes i have, that works, but i am thinking of removing ulx, and i wont have any acces to noclip, and on other servers which have ulx dont need ulx noclip to use noclip they use the default noclip, and the problem with ulx noclip is that admins can abuse it and give other players noclip, I could just demote them but i would rather try and work around it so they dont need ulx noclip acces to use noclip

What you could do is set sbox_noclip to 0 and deny the “ulx noclip” permission so admins can not use that and instead use this Lua hook:

function GM:PlayerNoClip(ply)
if IsValid(ply) and ply:IsAdmin() then
if ply:GetMoveType() == MOVETYPE_WALK then
ply:SetMoveType( MOVETYPE_NOCLIP )
elseif ply:GetMoveType() == MOVETYPE_NOCLIP then
ply:SetMoveType( MOVETYPE_WALK )

I have set the servers noclip and it enables it, when i press v to noclip it lets me noclip but then pulls me back in like 1 second do you know a fix ?? or what the problem could be ? and if i find a fix then ill need to restrict it which is what the hook is used for, where do i put the hook ?? I kinda suck a lua XD

I’m talking about disabling sbox_noclip. Setting it to 0 = disable.

The Lua hook makes it so the noclip (v) key only works for admins. This prevents the springing back problem.
The easiest way to use the hook under DarkRP is to do this:

Open up the DarkRP folder in garrysmod/gamemodes. Then go to gamemode/modules and create folder with whatever name you want. In there, create a document called sv_whatever name you want here.lua and paste the Lua hook in there.

Yeah i have disabled it :stuck_out_tongue: and thats when i cant even use noclip, and when i enable it i can use it but it puts me back to where i pressed v (for noclip) like 1 second later, ill do that and see how it goes :slight_smile: I was thinking that the noclip thing could be from me disabling noclip when i had fadmin and then i deleted it but the server still thinks its disabled and wont change it because i havent got fadmin if that is maybe possible ??

[editline]30th May 2013[/editline]

Bo98 I have added the hook that u had given to me earlier and I just wana say thank you very much as it worked :slight_smile: thank you for your time man :slight_smile: I really appreciate this :slight_smile:

With that Lua hook then noclip should work with sbox_noclip being disabled.

yeah it works with it disabled, but if i had to enable sbox_noclip then still only admins can noclip :stuck_out_tongue:

Yeah but what the Lua hook does that is different is that it fixes the problem where it puts you back where you pressed the noclip button (v) from, as you described, when you are not an admin.

ah ok kwl :slight_smile: awesome :slight_smile: thanks alot :slight_smile: Im thinking of another hook to add which i dono if it will work i wana make it so that when someone switches to a certain team it runs something like Player:SetArmor(100) for that player, or something that i could add in the shared file for jobs then at a certain job i add a code that makes the player spawn with armor, and for another job it gives that job godmode like Player:GodEnable( ) but i dono if i have to make a new ticket for that, i will if i have to and if this gets removed :stuck_out_tongue: or if u can add me on steam if you feel comfortable with that cause it seems like you know what you doing and that you are very helpful towards others ? :slight_smile:

hook.Add(“PlayerSpawn”, “GodArmourSpeedSet”, function(ply)
if not GAMEMODE.Config.babygod then
local t = ply:Team()
if t == TEAM_ADMIN then --Teams you want to enable God on.
if ply.Babygod then
timer.Destroy(ply:EntIndex() … “babygod”)
ply.Babygod = nil
local c = ply:GetColor()
ply:SetColor(Color(c.r, c.g, c.b, c.a))
elseif t == TEAM_POLICE or t == TEAM_CHIEF or t == TEAM_MAYOR then --Armoured teams.

Change the team names to what teams you want to alter. Untested but should work.

awesome :slight_smile: thanks ill try that and ill see how it goes :slight_smile: do i add a new hook for that ? :stuck_out_tongue:

It can be the same module if you want, doesn’t matter.

ok awesome thanks :slight_smile: If I Could Just Ask You 1 more favor I want to make a admin chat, super admin chat and also a report system so players just type !report Help Im Stuck In My e2, help I got rdmed, help I lost my pig or whatever, iv looked for addons for reporter and all i get is outdated addons and they dont work, so i though i could just add in a code or hook if possible ??