• How do I make entities not spawnable to certain jobs!
    8 replies, posted
I want it so when someone opens the spawnmenu and they are not the correct job, they cannot spawn the entity.
Use SANDBOX/PlayerSpawnSENT and Player/Team Something like this local blockedJobs = {   [TEAM_JOB_1] = true,   [TEAM_JOB_2] = true } hook.Add("PlayerSpawnSENT", "PreventSpawnForJobs", function(ply)   if blockedJobs[ply:Team()] then     return false   end   end)
Expanding on that, you can do something like this to whitelist certain ents for certain jobs: https://pastebin.com/73cDs8dd
It won't let me spawn the entity even when I am the job!
So the code I gave you is a whitelist: https://pastebin.com/ppEtxsLH But this is a blacklist: https://pastebin.com/pcXeen7j
i am not entirely sure about this but i beelive that URS has a feature that you can allow certain props entities etc. for custom user groups (an addon for ULX)
I didn't even know about the existence of this plugin but It looks like it has this feature yea. @ryanm2711 you have 2 options here already, use URS plugin or take bobblehead's code and use it
That would work but it restricts based on usergroup, not job.
I've tried blacklist and whitelist and it disables the spawning for all jobs
Sorry, you need to Log In to post a reply to this thread.