Skip to content

Enshrouded 1.0 is out! 🎉 Get 25% OFF your next Enshrouded Server today!

Garry's ModMods & Plugins

Restrict Prop Spawning to DarkRP Jobs

Let only chosen DarkRP jobs spawn props with a short PlayerSpawnProp module, plus the settings to switch prop spawning off or charge for it.

Updated 3 min read

Out of the box, DarkRP's own prop check looks at the propspawning setting and whether the player is arrested, not at their job. The prop settings at the end of this guide switch props off for everyone or charge for them, and limiting props to certain jobs takes a short script on a hook. Checked against DarkRP 2.7.0 (GitHub source, July 2026) and the Garry's Mod wiki, October 2026.

You need the full darkrpmodification addon, and a job to allow. If either is missing, start with Install DarkRP modifications on GMod. Edit files in the File Manager, under garrysmod/addons/darkrpmodification/lua/.

How it works

When a player spawns a prop from the spawn menu, Garry's Mod calls a hook named PlayerSpawnProp with the player and the model. If your function returns false, the prop is not spawned. Returning nothing lets DarkRP carry on with its own checks.

Add the script

  1. Make sure the job you want to allow has a name you can use in Lua. A job defined as TEAM_BUILDER = DarkRP.createJob("Builder", { ... }) in darkrp_customthings/jobs.lua is called TEAM_BUILDER. DarkRP's own jobs have names such as TEAM_MAYOR and TEAM_CITIZEN.
  2. In darkrp_modules, use New folder to make a folder called propjobs.
  3. Make a file called sv_propjobs.lua on your computer with the text below, then open the propjobs folder and add the file with Upload files. The sv_ prefix makes DarkRP run it on the server only.
hook.Add("PlayerSpawnProp", "propjobs_restrict", function(ply, model)
    if ply:IsAdmin() then return end
    if ply:Team() == TEAM_BUILDER or ply:Team() == TEAM_MAYOR then return end

    DarkRP.notify(ply, 1, 4, "Only builders can spawn props.")
    return false
end)
  1. Restart the server from the dashboard.

Read the script top to bottom. Admins are let through. A player whose job is TEAM_BUILDER or TEAM_MAYOR is let through. Everyone else gets a pop-up for four seconds and the prop is refused. Add more or ply:Team() == TEAM_... conditions for further jobs, or delete the admin line if admins should follow the same rule.

Warning

Do not use the PlayerSpawnProp field inside a job's own definition for this. DarkRP calls it but ignores what it returns, so it cannot block anything.

Other ways to control props

These are settings in darkrp_config/settings.lua:

  • GM.Config.propspawning is true by default. Set it to false to stop everyone spawning props, admins included.
  • GM.Config.proppaying is false by default. Set it to true and each prop costs the player GM.Config.propcost, which is 10 by default.

Save and restart after changing either.

Ragdolls and effects

Props are one kind of thing in the spawn menu. Ragdolls and effects have their own hooks, PlayerSpawnRagdoll and PlayerSpawnEffect, so the same pattern works for them if you want to restrict those too.

Common problems

  1. Everyone can still spawn props. The server was not restarted, or the file is not inside its own folder under darkrp_modules, or its name does not start with sv_.
  2. The builder is blocked too. A job name that is spelled differently from the one in jobs.lua, capitals included, never matches anyone, so builders are refused along with everyone else.
  3. Nobody can spawn props, admins included. Check GM.Config.propspawning has not been set to false.

Ready to launch your Garry's Mod server?

Aussie hardware, NVMe disks and DDoS protection, with the version and mod loader yours to change whenever you like.

See Garry's Mod plans