p-kuen / patchprotect Goto Github PK
View Code? Open in Web Editor NEWA Prop Protection for Garry's Mod
A Prop Protection for Garry's Mod
Now it's when the protection is on or off.
This feature is in URS' prop protectiom and is very useful, what it does is it allows specific clients to disable parts of the protection such as use, damage, physgun, etc for everything they own indefinitely for all users. In a way buddying everyone connected for the selected features.
Ok, i found out, when those strange overflows happen.
To reconstruct.
So... After some hours I came to that point, that there must be something wrong with the save things... :P
Ah before I forget. It is not the button's fault, because if I press the cleanup button or any other one, the overflow error doesn't come up.
Lua Error: [ERROR] addons/prop protection/lua/autorun/cppi.lua:122: attempt to call field 'CanTouch' (a nil value) 1. CPPICanPhysgun - addons/prop protection/lua/autorun/cppi.lua:122 2. updateOwnership - addons/uclip/lua/autorun/sv_uclip.lua:35 3. checkOwnership - addons/uclip/lua/autorun/sh_uclip.lua:46 4. checkVel - addons/uclip/lua/autorun/sh_uclip.lua:173 5. fn - addons/uclip/lua/autorun/sh_uclip.lua:205 6. unknown - addons/ulib/lua/ulib/shared/hook.lua:183
Lots of errors flooding my console today, only recent change has been updating the addon via SVN for the fixes of #41 and #42
the addlbl function does not work
I don't know, what produces this error, it must have something to do, that the vars for the entities are not correctly written, so it can't delete the affected ents.
Everyone (including me) cannot add people to the buddy list, no console errors are occurring.
Another feature FPP thought up in their antispam tool, it really does come in handy when players are trying to lag out the server.
If ignore admins is checked they should be able to touch higher ranks' props I feel.
I noticed I cannot block props with antispam off, can this be changed? Thanks!
Another enhancement that would make the transition from FPP smoother. Basically if I use the tool on a certain prop it allows me to share it with specific people and for specific uses. Here's Falco's code for it. https://github.com/FPtje/Falcos-Prop-protection/blob/master/lua/weapons/gmod_tool/stools/shareprops.lua
tool gun protection doesnt seem to do anything either even after itck the tools and save
I do not have gmod_turret blacklisted yet it tells me it is. This problem happens for non-admins.
[ERROR] addons/pprotect/lua/patchprotect/server/settings.lua:269: bad argument #1 to 'WriteString' (string expected, got nil)
Don't use the player name as owner identifier.
Use player objects instead.
Also, NWString is deprecated.
My personal wish is, that we will change the whole sql-settings some time later. Maybe we will do that in a seperate branch.
The reason, why i want to do that is, to come away from these client-convars and just save everything in nice tables. With more uncomplicated net messages and so on...
Ok, there is a problem with the damage protection, which I will explain here:
I thought about it quite some time, but I came to no solution for this problem, so I post it in here.
Ok, first of all the code, which produces the damage protection:
function sv_PProtect.EntityDamage( ent, info )
local Owner = ent:CPPIGetOwner()
local Attacker = info:GetAttacker()
if !ent:IsValid() or ent:IsPlayer() or sv_PProtect.Settings.PropProtection["use"] == false or sv_PProtect.Settings.PropProtection["damageprotection"] == false then return end
if Owner != Attacker then info:SetDamage(0) end
end
hook.Add( "EntityTakeDamage", "EntityGetsDamage", sv_PProtect.EntityDamage )
The reason for this is this line:
if Owner != Attacker then info:SetDamage(0) end
The Granade explodes, but for some reason, it seems that it doesn't make enough damage to explode the oildrum.
Only, if the drum got some damage of the fire, it explodes. But in that case (if the damge protection is enabled) the fire won't take damage to the drum, because the "Attacker"-Entity is not the owner of the Prop.
Also if you set a row of explosive drums and you shoot one with a pistol or smg, or something similar, only the attacked drum explodes. The other ones will react like the granade situation above.
What should be do now with the damge prop protection?
I thought some time about it and came to this points:
if Owner != Attacker and Attacker:IsPlayer() then info:SetDamage(0) end
So the prop will take damage from non-player entities too.
+: More Fun for other servers, as I explained above
-: There is a risk. If some other person places a prop near to yours and explodes it, the prop from you will also explode.
Ok, I think I wrote now enough for this topic. Please let me know, what you think about it ;)
My console decided to start flooding the chat this evening with a bunch of wire items, here is a copy of my console chatting.
I don't get why this is still happening I reinstalled the addon entirely once #38 was fixed and today it decides to print these.
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "gmod_wire_input"
Console: "prop_vehicle_prisoner_pod"
Console: "gmod_wire_turret"
Console: "prop_vehicle_prisoner_pod"
Console: "prop_vehicle_prisoner_pod"
Console: "prop_vehicle_prisoner_pod"
Console: "prop_vehicle_prisoner_pod"
Console: "prop_vehicle_prisoner_pod"
Console: "prop_vehicle_prisoner_pod"
Console: "prop_vehicle_prisoner_pod"
Console: "gmod_wire_turret"
Console: "gmod_wire_turret"
Console: "xmv_helicopter"
I'm not sure what caused this since it's not telling me people are spamming.
I am going to try reinstalling PatchProtect and maybe the console's comments will be helpful.
EDIT: could it possibly be part of https://github.com/Patcher56/PatchProtect/blob/master/lua/patchprotect/server/propprotection.lua#L163
RunConsoleCommand( "say", ent:GetClass() )
Thats the only reference to making chat happen I found.
EDIT 2: Yup, that did the trick.
How I found this out was I disabled the prop protection and reinstalled FPP but then noticed everyone was flinging everyone around the map! .-.
I'm going to have to uninstall it until this gets sorted out, I love the prop counter in the cleanup menu though!
[Error] addons/patchprotect <pprotect>/lua/patchprotect/client/hud.lua:134:attempt to index global 'entity owners' <anil vaue>
1.filter - addons/patchprotect <pprotect>/lua/patchprotect/client/hud.lua:134:
2. open entitymenu - lua/includes/modules/properties.lua:85
3. onscreenclick - lua/inclued//properties.lua:119
4.fn - lua/inclued//properties.lua:170
5. run-addons/ulib/lua/ulib/shared/hook.lua.183
6.unknowk- gamemodes/sandbox/gamemode/spawnmenu/contextmenu.lua:172
I have noticed in the FPP UI for showing who is the owner of an item it does not appear to be fully centered, if you point me to the line that tells where to put the text on the screen coordinate wise I will toy with how many pixels up it needs to go. From estimating though I would say move it up 2-5 pixels or move the background 2-5 pixels lower.
I'm not great with scripting, I only took a java class and know little about lua so hopefully text goes by the xy coordinate system xD
It would be very good if we could change the tool antispam like this:
At the moment you choose which tools should be antispam-blocked.
I thought it would be better if you choose the tools which should NOT be blocked and PatchProtect should detect the tools where it spams a prop. These props should be blocked automatically.
It is not possible to touch my own ragdolls.
If you look at a prop which was spawned by another player, it shows your name.
The notofication shows too long
[ERROR] addons/prop protection/lua/patchprotect/client/panel.lua:294: attempt to call method 'Nick' (a nil value)
How to reproduce :
run either of the following commands in console as a non-admin and it will work:
btn_cleanup
btn_cleanup_player
Add an admin check or something
As you can see in the photo below, user's cannot use their own hoverboards after they have been spawned, the tool name is just hoverboard. Maybe it is spawning as a world prop? Here is a link to the addon if you would like to try yourself. http://steamcommunity.com/sharedfiles/filedetails/?id=150455514
allow tool gun on map unticked and saved doesnt seem to do anything same with no prop protection for admins
Well, users are complaining again blah blah blah. Anyways here is a dupe someone was having trouble spawning, maybe this can help with making antispam not half paste stuff?
http://www.fileswap.com/dl/Nv2U0Jbs00/ (this is a .txt file for advdupe 1)
We should add this.
Another necessary feature for my server, here's the github link for uclip https://github.com/Nayruden/Ulysses/tree/master/uclip
you need to use CPPI according to their github.
Basically your prop protection doesn't stop people from flying through other people's stuff.
The purpose of CPPI is to make other mods able to talk to your prop protection.
http://facepunch.com/showthread.php?t=488410
The most popular mods like DarkRP and wiremod use this interface. This way these mods don't know to which prop protection they're talking, but they can know which players can touch which props.
E.g. DarkRP wants to know if you can pick up a prop when you pocket it.
when you clean someones props that has more than one it works but when you go back to the q menu it says he has props spawned even though he doesnt
A feature where PatchProtect watch you, how you use the tools and so it recognises which addons does spawn props and which not.. so the number of tools in the tool-block frame should sink.
Users don't know what prop block is.
We should explain this better.
I will check that.
Also part of the dd1b5f3 patch I think. Everyone can physgun all props and it is chaos. I am deleting the addon and redownloading it now. If that is the cause I will close this issue report.
The buddy menu should be very simple and effective.
The options are:
There also should be these options:
driving a prop that crashs you from server
As you know, netmessages need their time to get to the server or back to the client.
For that, the inormation, which gives a Player the alloweness to pick something up or whatever, takes too long and it is quite annoying if you want to do somthing quickly..
Maybe we have to think about a faster structure of getting permission information.
My admins are a little annoyed by the alert every time someone spams and would like to choose whether or not the sound occurs, thanks!
[Error] addons/patchprotect <pprotect>/lua/patchprotect/client/hud.lua:65: tried to use a null entity!
get name -[C]:-1
fn -addons/patchprotect <pprotect>/lua/patchprotect/client/hud.lua:65:
unknown -addon/ulib/lua/ulib/shared/hook.lua:183
Lua Error: [ERROR] addons/prop protection/lua/patchprotect/server/antispam.lua:182: attempt to call field 'CanToolProtection' (a nil value) 1. fn - addons/prop protection/lua/patchprotect/server/antispam.lua:182 2. Call - addons/ulib/lua/ulib/shared/hook.lua:183 3. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/shared.lua:250
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.