Hello, I've been looking around for something like this thread for a while but couldn't find anything that helped me. I am trying to disable prop spawning for users on my server but cannot figure it out?
Do I need to include a hook for something in a file or create my own lua file?
It took me 2 seconds to go to the gmod wiki and type in "spawnprop" and i immidetly found this.
SANDBOX/PlayerSpawnProp
do atleast some research before you make a post
But i dont know where to put that?
do you even know lua?
I know a bit, can you help or no? I've tried putting a lua file in my server files in my autorun folder but nothing worked.
that is one of the most easiest things possible..
put this in a lua file thats in autorun on your server
hook.Add("PlayerSpawnProp","DisablePropSpawn",function()
return false
end
no one can spawn props anymore
I want all staff to be able to spawn props (junior mods, mods, admin, senior admin, super admin, dev, community manager, founder). Is there something i can do for that? And does it matter what the lua file is
as long as the lua file is in a lua autorun it shouldnt matter. And it is possible to do that in a pretty easy way, but giving you that would be too much spoonfed code. I gave you that, and the other stuff you have to figure out yourself. I can say tho:
Make a table that has as values the rank names of the people that are allowed to spawn (junior mods, mods, admins, etc.)
then inside that hook make a for k v in pairs loop that goes through that table and checks if the player has one of these rangs. if he has, allow spawn, if he doesnt, dont allow spawn.
Sorry, you need to Log In to post a reply to this thread.