Garry's ModGarry's ModDarkRP

Restrict Prop Spawning to specific DarkRP Jobs

Lua script to restrict prop spawning to only specific DarkRP jobs on your GMod server.

Restricting prop spawning to only specific job(s)

Create the file: /garrysmod/addons/restrict_prop_spawning/lua/autorun/restrict_prop_spawning.lua

Paste the following code:

restrict_prop_spawning.lua
/* Allowed jobs can spawn props, all others cannot */
local propSpawningJobs = {
[TEAM_BUILDER] = true,
[TEAM_MOBBOSS] = true,
[TEAM_HOBO] = true,
}

hook.Add("PlayerSpawnProp", "JobSpawnPropRestrict", function(ply)
  if not propSpawningJobs[ply:Team()] then return false end
end)

Works with any DarkRP gamemode.

gmod darkrpgmod luaprop spawninggmod job restrictionsgmod server customization
Ready to get started?

Your server. The best panel. Any game.

Every Physgun server ships with the full panel experience out of the box — no setup, no extras, no waiting. Pick your game and start hosting.

Garry's ModRustMinecraftTeam Fortress 2S&Box
Pick Your Game