• Making tools Admin Only
    2 replies, posted
Not for the purpose of prop protection etc. I need to know how to make a tool admin only, like what line(s) of code do I put into my tools so minges and such can't spawn them, or just how to make the game as fair as possible. Who can help me?
Sandbox has a handy "CanTool" hook that you use to restrict tools. For example, this code snippet restricts tools in the table to admin only. [lua]local admintools = { "dynamite", "turret", "wire_igniter", } function RestrictTools(pl,tool) if !pl:IsAdmin() then for _,v in ipairs(admintools) do if v == tool then return false end end end hook.Add("CanTool","RestrictTools",RestrictTools)[/lua]
use a admin mod to restrict tools i use ass mod to do this sorry for being late i had this prob so i thort i would help :D
Sorry, you need to Log In to post a reply to this thread.