New Wiremod class for DarkRP - Help plz

So ive made a new class for DarkRP, called an electrician.

I want this to be the ONLY class to be able to use wiremod and pctools, does anyone know how i would go about this.

[lua] function WireRestriction( ply, tr, toolmode )
if string.find(toolmode, “wire”) then
if ply:Team() == TEAM_ELECTRICIAN then – add or ply:IsAdmin() if you want admins to be able to use them anyway
return true
return false

hook.Add( “CanTool”, “WireRestriction”, WireRestriction)[/lua]

Not tested but that should work.

Thanks for quick response, but where do i add this to. Im not very good at all with lua.

Anywhere serverside. So it could be at the end of the init/main.lua of your DarkRP, or just in garrysmod/lua/autorun/NameMe.lua

To save as lua just use notepad and save as .lua

Thanks works perfectly. Is it possible to block the physics panel in wiremod completely though.


And how about the PCTools as well.


Ye i really need the physics panel blocked out, because people just kill eachother.

Also, if its possible it would be great to have a a way of giving the contraptions made to someone else because if this class leaves we dont want the stuff he has made for someone else do dissapear.