• Simple Prop Protection
    779 replies, posted
Thanks Metroid48, I missed that one. Also added one for CanNoClip for uclip like stuff. If we do use something like this system, then we should form a standard group for it. Certification of compliance would be nice to check.
[QUOTE=PC Camp]Guys lets not get into this again.[/QUOTE] Agree, was actually a joke :keke:
I still think just having that one hook is much easier. But whatever as long as it works, I'll use it. And I hate the word 'prop'. And yeah, I guess it would be nice to have one good overall entity protection modification but at the end of the day there is always gonna be more than one and there is always going to be people that insist one is better than the other. So that's why coming up with this standards API thing is better. But the reason I think the hook idea would be good is that way a person can have more than one entity protectors on their server.
[QUOTE=ConnaCook]I still think just having that one hook is much easier. But whatever as long as it works, I'll use it. And I hate the word 'prop'. And yeah, I guess it would be nice to have one good overall entity protection modification but at the end of the day there is always gonna be more than one and there is always going to be people that insist one is better than the other. So that's why coming up with this standards API thing is better. But the reason I think the hook idea would be good is that way a person can have more than one entity protectors on their server.[/QUOTE] They can with my solution too. If you have it so that the script defines in the entity metatable the functions CanPlayerPickup(pl) and such other functions then it offers ease of use, assuming everyone agreed on a naming convention. However, that would purely be for convenience; the function would merely do a gamemode.call to keep compatibility with multiple scripts. Edit: What alternative to the word 'prop' is there? It's sort of standard right now and though, agreeably, prop protect scripts have started feeling generic, it's still the best name we have :(
Entity.
Does this work with the new update? "Gmod2007"
[QUOTE=ConnaCook]Entity.[/QUOTE] Yes, but the entity it spawns is a prop_physics_multiplayer so prop is a more accurate name.
Problems with the new update (GMOD07) is that the Prop Protection aspect is working fine but there is no client or admin control panel in the Q menu. Hope this can be fixed soon. This is definitely the best prop protection addon so it would be good to see it fixed.
I am taking a stab at an update for it as I use it across my servers. Not sure how well it will turn out. =P
I hope a new version will fix the menu bug soon!
Never mind about this post. I've Read the actual first page and tried to reply on that. God I can be so stupid at times.
[QUOTE=Armada651]Yes, but the entity it spawns is a prop_physics_multiplayer so prop is a more accurate name.[/QUOTE] Why BY HABBOG are you fighting about a name?
Update for the garry's mod update.
[QUOTE=Armada651]Yes, but the entity it spawns is a prop_physics_multiplayer so prop is a more accurate name.[/QUOTE] I disagree with the way valve named things, it's an entity. Not a prop - it's not a movie set. But anyway, this is really off topic.
Can you guys copy and paste any errors you guys are getting
Q menu isn't working not sure what the lua error is as this is no longer installed on my server.
I get this error on my client but no errors on my server! [lua] Hook 'SPropProtection.HUDPaint' Failed: includes/extensions/util.lua:39: attempt to call method 'GetAimVector' (a nil value) [/lua]
Can someone update this prop protection please after the Garry's mod update?
To update do the following: addons/Simple Prop Protection/lua/autorun/client/cl_SPropProtection.lua Replace cl_SPropProtection.lua with the following: LUA modifications done by High6. [code] ------------------------------------ -- Simple Prop Protection -- By Spacetech ------------------------------------ if(SinglePlayer()) then return end local SPropProtection = {} SPropProtection.AdminCPanel = nil SPropProtection.ClientCPanel = nil CreateClientConVar("SPropProtection_toggle", 1, false, true) CreateClientConVar("SPropProtection_admin", 1, false, true) CreateClientConVar("SPropProtection_use", 1, false, true) CreateClientConVar("SPropProtection_edmg", 1, false, true) CreateClientConVar("SPropProtection_pgr", 1, false, true) CreateClientConVar("SPropProtection_awp", 1, false, true) CreateClientConVar("SPropProtection_dpd", 1, false, true) CreateClientConVar("SPropProtection_dae", 0, false, true) CreateClientConVar("SPropProtection_delay", 120, false, true) function SPropProtection.HUDPaint() local tr = util.TraceLine(util.GetPlayerTrace(LocalPlayer())) if(tr.HitNonWorld) then if(tr.Entity:IsValid() && !tr.Entity:IsPlayer() && !LocalPlayer():InVehicle()) then local PropOwner = "" if(tr.Entity:GetNetworkedString("Owner") == "") then PropOwner = "Owner: N/A" else PropOwner = "Owner: "..tr.Entity:GetNetworkedString("Owner") end surface.SetFont("Default") local Width, Height = surface.GetTextSize(PropOwner) Width = Width + 25 draw.RoundedBox(4, ScrW() - (Width + 8), (ScrH()/2 - 200) - (8), Width + 8, Height + 8, Color(0, 0, 0, 150)) draw.SimpleText(PropOwner, "Default", ScrW() - (Width / 2) - 7, ScrH()/2 - 200, Color(255, 255, 255, 255), 1, 1) end end end hook.Add("HUDPaint", "SPropProtection.HUDPaint", SPropProtection.HUDPaint) function SPropProtection.AdminPanel(Panel) if(!LocalPlayer():IsAdmin()) then return end Panel:ClearControls() if(!SPropProtection.AdminCPanel) then SPropProtection.AdminCPanel = Panel end Panel:AddControl("Header", {Text = "Admin Panel - Simple Prop Protection by Spacetech"}) Panel:AddControl("CheckBox", {Label = "Prop Protection On/Off", Command = "SPropProtection_toggle"}) Panel:AddControl("CheckBox", {Label = "Admins Can Do Everything On/Off", Command = "SPropProtection_admin"}) Panel:AddControl("CheckBox", {Label = "Use Protection On/Off", Command = "SPropProtection_use"}) Panel:AddControl("CheckBox", {Label = "Entity Damage Protection On/Off", Command = "SPropProtection_edmg"}) Panel:AddControl("CheckBox", {Label = "Physgun Reload Protection On/Off", Command = "SPropProtection_pgr"}) Panel:AddControl("CheckBox", {Label = "Admins Can Touch World Props On/Off", Command = "SPropProtection_awp"}) Panel:AddControl("CheckBox", {Label = "Disconnect Prop Deletion On/Off", Command = "SPropProtection_dpd"}) Panel:AddControl("CheckBox", {Label = "Delete Admin Entities On/Off", Command = "SPropProtection_dae"}) Panel:AddControl("Slider", {Label = "Deletion Delay in seconds", Command = "SPropProtection_delay", Type = "Integer", Min = "10", Max = "600"}) Panel:AddControl("Button", {Text = "Apply Settings", Command = "SPropProtection_ApplyAdminSettings"}) Panel:AddControl("Button", {Text = "Reload Settings File", Command = "SPropProtection_ReloadSettings"}) Panel:AddControl("Header", {Text = "Cleanup Panel"}) for k,ply in pairs(player.GetAll()) do if(ply:IsValid()) then Panel:AddControl("Button", {Text = ply:Nick(), Command = "SPropProtection_CleanupProps "..ply:Nick()}) end end Panel:AddControl("Header", {Text = "Other Cleanup Options"}) --Panel:AddControl("Button", {Text = "Cleanup Ownerless Props", Command = "SPropProtection_CleanupOwnerlessProps"}) Panel:AddControl("Button", {Text = "Cleanup Disconnected Players Props", Command = "SPropProtection_CleanupDisconnectedProps"}) end function SPropProtection.ClientPanel(Panel) Panel:ClearControls() if(!SPropProtection.ClientCPanel) then SPropProtection.ClientCPanel = Panel end Panel:AddControl("Header", {Text = "Client Panel - Simple Prop Protection by Spacetech"}) Panel:AddControl("Button", {Text = "Cleanup All Props", Command = "SPropProtection_CleanupProps"}) Panel:AddControl("Header", {Text = "Buddies Panel"}) local Players = player.GetAll() if(table.Count(Players) == 1) then Panel:AddControl("Label", {Text = "No Other Players Are Online"}) else for k,ply in pairs(Players) do if(ply:IsValid() && ply != LocalPlayer()) then local NewNick = string.Replace(ply:Nick(), " ", "_") local BCommand = "SPropProtection_BuddyUp_"..NewNick if(!LocalPlayer():GetInfo(BCommand)) then CreateClientConVar(BCommand, 0, false, true) end Panel:AddControl("CheckBox", {Label = ply:Nick(), Command = BCommand}) end end Panel:AddControl("Button", {Text = "Apply Settings", Command = "SPropProtection_ApplyBuddySettings"}) end Panel:AddControl("Button", {Text = "Clear All Buddies", Command = "SPropProtection_ClearBuddies"}) end -- function SPropProtection.ClearBuddies(um) -- end -- usermessage.Hook("SPropProtection.ClearBuddies", SPropProtection.ClearBuddies) function SPropProtection.SpawnMenuOpen() if(SPropProtection.AdminCPanel) then SPropProtection.AdminPanel(SPropProtection.AdminCPanel) end if(SPropProtection.ClientCPanel) then SPropProtection.ClientPanel(SPropProtection.ClientCPanel) end end hook.Add("SpawnMenuOpen", "SPropProtection.SpawnMenuOpen", SPropProtection.SpawnMenuOpen) function SPropProtection.PopulateToolMenu() spawnmenu.AddToolMenuOption("Utilities", "Simple Prop Protection", "Admin", "Admin", "", "", SPropProtection.AdminPanel) spawnmenu.AddToolMenuOption("Utilities", "Simple Prop Protection", "Client", "Client", "", "", SPropProtection.ClientPanel) end hook.Add("PopulateToolMenu", "SPropProtection.PopulateToolMenu", SPropProtection.PopulateToolMenu) [/code] Shameless plug: see the modification at work.. [Nodex] Servers 69.12.92.63:27015 69.12.92.66:27015 69.12.92.99:27015
I tried that and the panel still doesn't seem to show.
[QUOTE=clone11]I tried that and the panel still doesn't seem to show.[/QUOTE] You must done something wrong, all I can say it works like a charm.
Well the protection it's self works but not the menu to add people.
[QUOTE=hatred]To update do the following: addons/Simple Prop Protection/lua/autorun/client/cl_SPropProtection.lua Replace cl_SPropProtection.lua with the following: [/QUOTE] That worked great. Thankyou.
Okay, something that has been a problem with this mod from the beginning, which I would like to see fixed, as well as support for the new Gmod11. I am superadmin on my server, and as such has access to the Protection controls in the Q menu, however, Prop Damage Protection (I don't know the proper name for it sorry, but you get the idea) does not always work. When admins are set to be able to do anything, Prop Damage Protection completely stops working, however, when I turn that off, it suddenly kicks in... Any chance of getting this fixed? Thanks space
[QUOTE=MrMatt]Okay, something that has been a problem with this mod from the beginning, which I would like to see fixed, as well as support for the new Gmod11. I am superadmin on my server, and as such has access to the Protection controls in the Q menu, however, Prop Damage Protection (I don't know the proper name for it sorry, but you get the idea) does not always work. When admins are set to be able to do anything, Prop Damage Protection completely stops working, however, when I turn that off, it suddenly kicks in... Any chance of getting this fixed? Thanks space[/QUOTE] It doesn't work for who? The admins?
[QUOTE=clone11]Well the protection it's self works but not the menu to add people.[/QUOTE] Damn this is true. The above fix makes the protection work but the buddies panel is useless. You tick the buddy, apply - looks like it has worked (tip comes up and all) - but as soon as you open the q menu again the tick has gone and it was never saved at all.
This is the best prop protection obviously but there's one problem. The admin cleanup player buttons do not work.
[QUOTE=adamscybot]Damn this is true. The above fix makes the protection work but the buddies panel is useless. You tick the buddy, apply - looks like it has worked (tip comes up and all) - but as soon as you open the q menu again the tick has gone and it was never saved at all.[/QUOTE] It could be that the control panel isn't refreshing. See if it really didn't work.
[QUOTE=PC Camp]This is the best prop protection obviously but there's one problem. The admin cleanup player buttons do not work.[/QUOTE] Clearly not, I mean I would say it was good prop protection but there is probably a certain plugin out there that is better, maybe you should try it PC Camper ;)
[QUOTE=ConnaCook]Clearly not, I mean I would say it was good prop protection but there is probably a certain plugin out there that is better, maybe you should try it PC Camper ;)[/QUOTE] Still not as good.
Sorry, you need to Log In to post a reply to this thread.