Hello, is there a way or code that i can use to make no one avaible except owner group (rank) to use tools on cars? prop_vehicle_jeep (tdmcars/sicknessmodel)
If so, where do i put it? Bye!
[QUOTE=Dexyer;44563683]Hello, [B][I]is there a way[/I][/B] [/QUOTE]
No, there is no way, I stay up, all night, thinking about it. For years I have thought about it, never coming up with a solution, years ago there was a coder, he somehow found a way to do this with Lua, but he is gone now. All my life I have been looking for a way, THERE IS NO WAY!
([url]https://www.youtube.com/watch?v=KmPXzK01F6M[/url])
But seriously here: [url]http://wiki.garrysmod.com/page/SANDBOX/CanTool[/url]
[code]function PlayerPickup2(ply, trace)
local ent = trace.Entity
//If the player is a super admin, and the entity is a player
if !ply:IsSuperAdmin() and ent:IsVehicle() then
return false -- Allow pickup
end
end
hook.Add("CanTool", "Allow Player Toolgun", PlayerPickup2)
[/code]
Maybe you want to use IsUserGroup( "owner" ) instead of IsSuperAdmin()
Sorry, you need to Log In to post a reply to this thread.