DarkRP PD doors.

I am currently setting up a DarkRP server, using ULX admin mod, and the map is rp_downtown_v4c . Im in a spot where I’m stuck, how do i make it where the mayor and cops own certain doors? any help? thanks. sorry for being a n00b.

Use Lua.

the same way that you can own a door you can set it to cop/mayor only with admin on darkrp

You mean the door groups?

If yes, then you already have them. Look at the bottom at line 131-142 into the shared.lua ( DarkRP/gamemode/… ). You can find it included with a description:

[lua]
/*

HOW TO MAKE A DOOR GROUP

AddDoorGroup(“NAME OF THE GROUP HERE, you see this when looking at a door”, Team1, Team2, team3, team4, etc.)

WARNING: THE DOOR GROUPS HAVE TO BE UNDER THE TEAMS IN SHARED.LUA. IF THEY ARE NOT, IT MIGHT MUCK UP!

The default door groups, can also be used as examples:
*/
AddDoorGroup(“cops and mayor only”, TEAM_CHIEF, TEAM_POLICE, TEAM_MAYOR)
AddDoorGroup(“gundealer only”, TEAM_GUN)
[/lua]

I think he means that he wants to do this in-game and not add any more door groups just to set them on a map that has none preset for him all you do is make yourself an administrator or higher with ULX and press F2 on the door then set door custom group, “cops and mayor only”.

Yes I know i’m late :slight_smile:

As a super admin, go to a door and press F2. You’ll see a menu allowing you to disable the ownership or to restrict the door to certain jobs or groups. You can also give it a neat title, such as “Police Department Entrance”.

No I prefer Using PHP In Gmod, Guhuhuhuh

Not really.

Go ingame and use your keys, click Door group and then cops and mayor only. You must set yourself as FAdmin first by going into console and typing rcon setuser root Your name here