• Get attacker when player is killed by someone swinging a prop with their physgun
    26 replies, posted
I don't want to prevent propkilling damage, but I do want to find out when a player is killed as a result of someone else swinging a prop around with their physgun, and punish them accordingly. I've found surprisingly little about this problem by searching google. It's not completely necessary to get the attacker if the prop was dropped on them, and they were killed while no one was holding the prop, but it would be nice if it found that as well.
I'm pretty sure you cant kill someone just by swinging it, you have to let it go. So in when it is let go ([img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/PhysgunDrop]GM/PhysgunDrop[/url]) record the player that is dropping it. Then when it kills someone, you can look up who dropped. HOWEVER THIS IS A BAD IDEA, it doesn't work when people push one prop into another, hit props with their vehicles, or when they just spawn a prop in the air and it drops on someones head. Don't rely on whatever you set up to be 100% evidence, just use the information to look it into further.
Players can drag around ragdolls, and are able to kill other players using that. Can I detect that?
[QUOTE=Maurdekye;47297719]Players can drag around ragdolls, and are able to kill other players using that. Can I detect that?[/QUOTE] Yeah use the same approach but do it when props are picked up instead of dropped. Record the player picking it up. When a player is killed, check if it was by a ragdoll, if it was being carried, and who by. I'll add some wiki links in a minute
The real problem comes in when a player pushes another players prop into someone.
I'm thinking about a system to draw blame on a player for indirect propkilling. Basically, whenever a prop is picked up by a player, it gets assigned a meta-value tag pointing to that player. If a prop collides with another prop, then the prop with the highest velocity prior to the collision pushes it's ownership onto the other prop, assigning it a meta-value as well. As one last check, if a prop stops moving, then it's ownership value is cleared. I've got everything down except for how to efficiently check if a prop stops moving; I made a separate post about it earlier. [editline]11th March 2015[/editline] This also applies to if a player spawns a prop, or picks it up via any other means, ie. with their gravity gun or with their hands.
Holy shit, lock this thread before FPtje gets here, he will lose his shit. It is never ever ever a good idea to use any sort of prop kill detection system, ever. Trust me, it will never be 100% accurate. Just give up, please for the love of god don't even bother. Please, listen to this advice, before, [B][I][U]he[/U][/I][/B] comes... [sp] FPtje will probs give you a really good lecture about it if he sees this, he's really great, and I'm saying, you really should just not do it and avoid this issue, and save his and others time. [/sp]
Do yourself an favour and don't do it. Minges aren't that stupid anymore. There are more enought ways to trick your system. FPtje, like AnonTakesOver, can show you how easy. The ultimate Solution for that is to have good, trustworthy Admins. That is the Only, i repeat, the only real solution without any downsights.
Anon is right. This is one of the few things that makes me lose my shit. It's so bad even that I bookmarked my main argunents: [url]http://facepunch.com/showthread.php?t=1251297&p=39793771&viewfull=1#post39793771[/url] Summary: Every prop kill detection script has errors. It's impossible for them not to have errors (see thread for watertight evidence) These errors are easily exploited by clever people to make it put the blame of a purposeful prop kill on innocent people. There is no way to fix it and there is no way around it. Making a detection script automatically kick or ban will give minges the ability to kick anyone. I've seen this happen. The idea then is to just tell the admins about the prop kill and have them decide. This is equally retarded. You'd be expecting admins to decide who the prop killer is even though the admin has even less information than the script itself. I've got a video on my channel in which such script is abused to make an admin ban an innocent person. Even with a huge warning that the script is terrible, doesn't ever know anything for sure and is made by an idiot doesn't fix the problem that I show in that video. [editline]11th March 2015[/editline] [media]http://youtube.com/watch?v=PHiDushdnpo[/media]
On my server, we did have a propkill protection script. However, we also gave every member of staff access to the spectate command. The idea was not to ban people straight away, but to watch them and see if they keep propkilling on purpose. We never banned people just because of the propkill logging.
[QUOTE=meharryp;47300827]On my server, we did have a propkill protection script. However, we also gave every member of staff access to the spectate command. The idea was not to ban people straight away, but to watch them and see if they keep propkilling on purpose. We never banned people just because of the propkill logging.[/QUOTE] The problem is that it's really hard to find out how many innocent people are banned. Do you trust your admins to never rely on the prop kill messages for any information?
Your video is very exemplary of the problem with most propkill detection scripts, FPtje, and I can see why that particular script would be a problem. But that problem would not arise in the system that I suggested, and I hope you could see why. The reason is that with my method, it's not individual props themselves that are attributed to player kills, which is a faulty method of checking, but rather the prop's [I]momentum[/I] that is attributed to player kills. With my system, the above cheat shown in the video would not work, and only display the exploiter as killing themselves, because they were the one to impart momentum onto the prop and cause it to do enough damage to kill. You people are preaching how horrible it would be to implement a propkill script, and how much it could be exploited. Well, if you think it's a bad idea, then tell me; how would you exploit a script built around my system? Give me specific examples please, before criticizing and chastising me.
[QUOTE=Maurdekye;47302754]Your video is very exemplary of the problem with most propkill detection scripts, FPtje, and I can see why that particular script would be a problem. But that problem would not arise in the system that I suggested, and I hope you could see why. The reason is that with my method, it's not individual props themselves that are attributed to player kills, which is a faulty method of checking, but rather the prop's [I]momentum[/I] that is attributed to player kills. With my system, the above cheat shown in the video would not work, and only display the exploiter as killing themselves, because they were the one to impart momentum onto the prop and cause it to do enough damage to kill. You people are preaching how horrible it would be to implement a propkill script, and how much it could be exploited. Well, if you think it's a bad idea, then tell me; how would you exploit a script built around my system? Give me specific examples please, before criticizing and chastising me.[/QUOTE] Well you're not clear. [quote]rather the prop's [I]momentum[/I] that is attributed to player kills.[/quote] I can only [I]guess[/I] that you mean "the one that caused the prop to have momentum", by which I can only [U]guess[/U] you mean the last person who physgunned it, valid until velocity is zero. That can be bypassed by pusing a prop that a player dropped somewhere into another player. In a way that's just redirecting the "thrown" prop. Give me a specific pseudo algorithm and I might actually not have to guess what you mean. Please describe the steps between getting the momentum of a prop (ent:GetVelocity()) and pointing to a specific player. [editline]11th March 2015[/editline] Do you mean killing people [I]while still[/I] holding the prop with physgun? Well that won't work unless people are trying to kill with welded props. Props that you're holding with the physgun don't do damage.
I am referring to the psuedo-algorithm I posted earlier in this thread. I'll paste it here, since you can't be bothered to go back up and look for it; [QUOTE=Maurdekye;47298132]I'm thinking about a system to draw blame on a player for indirect propkilling. Basically, whenever a prop is picked up by a player, it gets assigned a meta-value tag pointing to that player. If a prop collides with another prop, then the prop with the highest velocity prior to the collision pushes it's ownership onto the other prop, assigning it a meta-value as well. As one last check, if a prop stops moving, then it's ownership value is cleared. I've got everything down except for how to efficiently check if a prop stops moving; I made a separate post about it earlier. [editline]11th March 2015[/editline] This also applies to if a player spawns a prop, or picks it up via any other means, ie. with their gravity gun or with their hands.[/QUOTE] [editline]11th March 2015[/editline] Obviously, the algorithm should be more complicated; all props that are constrained to eachother ought to share a common ownership meta-tag, and props should also have their tags set if a player simply jumps on top of or runs into a prop.
[QUOTE=Maurdekye;47302909]I am referring to the psuedo-algorithm I posted earlier in this thread. I'll paste it here, since you can't be bothered to go back up and look for it; [editline]11th March 2015[/editline] Obviously, the algorithm should be more complicated; all props that are constrained to eachother ought to share a common ownership meta-tag, and props should also have their tags set if a player simply jumps on top of or runs into a prop.[/QUOTE] I meant that I didn't understand either post, but based on your last paragraph you're still using ownership. Ownership doesn't work. See proof posted in link.
"Based on my paragraph, you're still using ownership", ie. I mentioned the word a couple times. Did you even read the psuedo-algorithm? Props don't have definite ownership; they instead carry blame. It is easily subverted and lost quickly, and only exists while the prop is in motion. You didn't even bother to provide a specific example; you're just preaching rhetoric so you don't have to deal with my argument.
[QUOTE=Maurdekye;47303182]"Based on my paragraph, you're still using ownership", ie. I mentioned the word a couple times. Did you even read the psuedo-algorithm? Props don't have definite ownership; they instead carry blame. It is easily subverted and lost quickly, and only exists while the prop is in motion. You didn't even bother to provide a specific example; you're just preaching rhetoric so you don't have to deal with my argument.[/QUOTE] Of course I read it. I think I understand now. Drop prop -> set blame. Velocity 0 -> remove blame. Getting around it: push prop before the velocity hits 0. The blame will still be put on the person who dropped it. Also, don't jump to conclusions too quickly. I genuinely have a hard time understanding when you want to store what on which props and how you use that data. I can think of counterexamples really easily. [editline]11th March 2015[/editline] Highest velocity prop push priority doesn't work because you can nudge a fast prop in the right direction. Nudge of course with a lower velocity. [editline]11th March 2015[/editline] Also, wire forces can probably make someone else's prop move without touching it. You'd have to hook into that, e2 functions and other wire stuff to fix that. [editline]11th March 2015[/editline] Actually, my original proof shows your algorithm to be unsound with a tiny change: [url]http://facepunch.com/showthread.php?t=1251297&p=39851914&viewfull=1#post39851914[/url] Replace step 1 with "drops a prop with the physgun" instead of spawning it. Also note that prop Y has a lower velocity than prop X at the time of collision, so the tag wouldn't come from Y. [editline]11th March 2015[/editline] Also, isn't your idea the same as oubliette's here? [url]http://facepunch.com/showthread.php?t=1251297&p=39847327&viewfull=1#post39847327[/url] He also tags the prop on drop and based on the entities touched. I believe he expands it in later posts to reset on 0 velocity and uses the same highest velocity heuristic. [editline]11th March 2015[/editline] Please read the rest of the thread. Imagine you're oubliette in that thread. He went really far in writing the algorithm. It pointed towards multiple players when not sure, it walked down multiple branches of collisions, building up a whole tree. Post 80 is your idea plus a load of that fancy shit and it still didn't work. In post 88 he gives up. I've proven it to be impossible. No matter how clever you make the algorithm, it's as impossible as the halting problem which I also explain in that thread. The proof is logical, not anecdotal.
Under the situation you linked, yes, it's very ambiguous. But I don't aim to cover those cases; they are so rare, few, and far in between that the actual outcome has very little significance on the overall picture. That situation couldn't even be used for exploitation; it would be immensely difficult to recreate purposely, and if it was, the majority of attempts to do so would end up with the intended exploiter being blamed anyway under the suggested system. Yes, this script might reach ambiguities, and occasionally place blame on the wrong person 1 in every 100 or more cases. As you've stated, the ambiguous nature of intent and complex physics simulation ordains it as such. But it is nonetheless incredibly difficult to exploit for an unfair purpose, as opposed to the one shown in the video. Is there a case where it would be easier to trick my script into blaming the wrong individual purposefully than in the one described in the video? [editline]11th March 2015[/editline] Here's some psuedocode I've whipped up to better explain my script; [code] function calledPlayerInteractsWithPhysObj(ply, object) object.owner = ply end function calledEveryQuaterSecond() for prop in allProps do if prop:IsAsleep() then prop.owner = nil end end end function calledTwoEntitiesCollide(entone, enttwo) if entone.owner == nil then entone.owner = enttwo.owner elseif enttwo.owner == nil then enttwo.owner = entone.owner else if entone:GetVelocity() > enttwo:GetVelocity() then enttwo.owner = entone.owner else entone.owner = enttwo.owner end end end function calledPlayerKilled(player, attacker) if attacker:IsPhysicsObject() and attacker.owner ~= nil then print(player .. " killed by " .. attacker.owner) else print(player .. " killed by " .. attacker) end end[/code] I hope it explains my intent more clearly.
[QUOTE=Maurdekye;47304130]Yes, this script might reach ambiguities, and occasionally place blame on the wrong person 1 in every 100 or more cases. As you've stated, the ambiguous nature of intent and complex physics simulation ordains it as such. But it is nonetheless incredibly difficult to exploit for an unfair purpose, as opposed to the one shown in the video. Is there a case where it would be easier to trick my script into blaming the wrong individual purposefully than in the one described in the video?[/QUOTE] If an individual figures out that you are blaming a user you could easily create an e2 to exploit your unlikely scenario. You may also cause users to join your server just for a challenge to get as many people banned without getting caught. You shouldn't do it just because it is unlikely, someone will do it and you may lose a large percentage of your population over it.
[QUOTE=Pandaman09;47304201]If an individual figures out that you are blaming a user you could easily create an e2 to exploit your unlikely scenario. You may also cause users to join your server just for a challenge to get as many people banned without getting caught. You shouldn't do it just because it is unlikely, someone will do it and you may lose a large percentage of your population over it.[/QUOTE] An e2 that interacts with props would obviously relay blame from the e2's owner, via applyForce methods. So that's not an issue. It's unlikely because it's difficult to recreate, as I've stated above. For the situation to ever arise on purpose, two players would have to be cooperating, and at least one of them would end up getting blamed from the result, so there's nothing to gain for them. And by the way, if a player is spawning props on the ceiling of the map, then they're probably deserving of any blame they take for killing people with said props. [editline]11th March 2015[/editline] The reason I believe so much in my method, is because even such a complex device as a long-winded rube-goldberg machine with 30 individually interacting parts would still theoretically succesfully relay blame from the first person who set it off to the final piece that kills whoever is standing at the end of it. Every single physics prop interaction relays the blame from the initiator to the next object, which in return interacts with the next one, which follows suit all the way through to the end where proper blame is placed. I also believe in it, because if someone were to spawn every single prop on a map, and have people run around propkilling with them, then as long as the spawner secludes themselves they would never be given blame for any actions, because they never acted upon any of the props after spawning them. Also, I don't plan on banning people who propkill; this is only to aid me in discouraging it when it occurs, and assisting other plugins I have that work with when players kill eachother intentionally.
[QUOTE=Maurdekye;47304130] Yes, this script might reach ambiguities, and occasionally place blame on the wrong person 1 in every 100 or more cases. ... But it is nonetheless incredibly difficult to exploit for an unfair purpose, as opposed to the one shown in the video.[/QUOTE] I find it particularly malevolent that you [b]know[/b] that your script is wrong and nevertheless have it blame innocent people every "[i]1 in every 100 or more cases[/i]". Almost as terrible is that you make this number up [i]just[/i] because your gut feeling tells you that it's difficult to exploit. The exploit is there. Your system is even simpler than that of Oubliette. Also [u]do NOT underestimate clever minges[/u]. There's a group of good prop killers, and they [i]really[/i] know the quirks of the gmod physics system and can do the craziest things with them. Have an anecdote. I believe it was in a discussion that happened before the thread on facepunch I linked earlier. I believe it was a discussion with Netheous (correct me if I'm wrong). He made a system that's more advanced than yours, using highest velocities of collided entities, but also using cooldown timers besides the 0 velocity to reset the owner. [u]Not only that![/u] After a prop kill detection his script would freeze ALL the blamed person's props so it couldn't be exploited again. Or so he thought. He ALSO said the chance is [i]very small[/i] that his script would be wrong. He [i]ALSO[/i] said that it would be impractical even for good minges to exploit. He was so confident of his script that he made it automatically kick the blamed person after like three warnings. Then I joined his server. I played around with it for half an hour before I got someone kicked innocently. Someone implented all of your ideas and more. Yet I could still get arbitrary people kicked from a server without anyone noticing what was really going on. All that while I wasn't even as well up to date with prop killing as my friends are!
instead of having a propkill detection script simply null out DMG_CRUSH. [code] hook.Add( "EntityTakeDamage", "NoPropDamage", function( ent, dmg ) if ( bit.band( dmg:GetDamageType(), DMG_CRUSH ) ~= 0 ) then return false end end ) [/code] Untested but that should illustrate how to do it.
The script is not wrong; you are misusing the definition. It would be wrong if it didn't do what I wanted it to do, which it does. It is certainly a much fairer and more viable alternative to having no script whatsoever. His script being more complex than mine has no bearing on it's effectiveness; it's entirely possible that it aimed to do something entirely different to what I am doing. Not to mention you didn't even say what you did to get the people kicked; you just vaguely described that you succeeded in doing so. Besides, my script doesn't aim to kick or ban players, and it would never do that. Its only purpose is to alert admins to the fact that people are indeed being propkilled, and to work with other plugins to temporarily punish players who take part. Even if this script was horribly broken and did nothing aligned with what it was supposed to do, it would barely impact the playability of my server because of the type of punishments given. You seem to be set into a single mindset: that a propkill script cannot possibly be effective, because it cannot be perfect in 100% of cases. This is the farthest possible from the truth. Even if it was only effective in 50% of cases, it would still be preferable to having no script whatsoever, and therefore be effective enough to be used. Also, Joeyl10, I don't want to prevent the damage, I just want to detect it's presence. I'm fine with players attempting to propkill eachother, but my script exists to doll out the proper consequences for those who do.
[QUOTE=Maurdekye;47304723]The script is not wrong; you are misusing the definition. It would be wrong if it didn't do what I wanted it to do, which it does. It is certainly a much fairer and more viable alternative to having no script whatsoever. His script being more complex than mine has no bearing on it's effectiveness; it's entirely possible that it aimed to do something entirely different to what I am doing. Not to mention you didn't even say what you did to get the people kicked; you just vaguely described that you succeeded in doing so. Besides, my script doesn't aim to kick or ban players, and it would never do that. Its only purpose is to alert admins to the fact that people are indeed being propkilled, and to work with other plugins to temporarily punish players who take part. Even if this script was horribly broken and did nothing aligned with what it was supposed to do, it would barely impact the playability of my server because of the type of punishments given. You seem to be set into a single mindset: that a propkill script cannot possibly be effective, because it cannot be perfect in 100% of cases. This is the farthest possible from the truth. Even if it was only effective in 50% of cases, it would still be preferable to having no script whatsoever, and therefore be effective enough to be used.[/QUOTE] Are you here to get help or to strike down any and all ideas that come your way as suggestions? [QUOTE=Maurdekye;47304723]Also, Joeyl10, I don't want to prevent the damage, I just want to detect it's presence. I'm fine with players attempting to propkill eachother, but my script exists to doll out the proper consequences for those who do.[/QUOTE] Why would you decline to fix the root cause, and instead, opt to leave it essentially as a trap to other players? Why punish people for propkilling when you can just remove the entire concept of propkilling? That logic is flawed.
You know what? Just don't even bother continuing to argue with me. I didn't make a post on this forum to argue about the semantics of propkilling and how it should be treated; I came here to solve a problem I was having trouble with. It's none of your business how I deal with my own server on my own terms by myself; maybe I'm okay with the way my logic works out to deal with the situation, and that's not your problem. Put aside your differences in opinion with mine, as I have yours, and let's get back to that original problem. [editline]11th March 2015[/editline] [QUOTE=Revenge282;47304768]Are you here to get help or to strike down any and all ideas that come your way as suggestions?[/QUOTE] He was not presenting me with suggestions; he was attempting to prevent me from chasing this goal at all. I would not call that constructive under any defintion. [QUOTE=Revenge282;47304768] Why would you decline to fix the root cause, and instead, opt to leave it essentially as a trap to other players? Why punish people for propkilling when you can just remove the entire concept of propkilling? That logic is flawed.[/QUOTE] I am not attempting to prevent propkilling; players are allowed to take part in it as much as they please. My "punishments" are simply tweaks to the player's personal environment to put them on fairer grounds with other players that they are killing. The same goes for players who opt to shoot others; they are allowed, but they are "punished", so to speak, so that they are on a more level playing field with those that they are fighting. The situation is more fair this way. [editline]11th March 2015[/editline] Here is a link to the script which I wrote myself and am currently using to dictate PvP on my personal server; [url]http://steamcommunity.com/sharedfiles/filedetails/?id=405601702[/url] Its purpose should give you a better idea of why I want to punish players for propkilling.
[QUOTE=Maurdekye;47304778]You know what? Just don't even bother continuing to argue with me. I didn't make a post on this forum to argue about the semantics of propkilling and how it should be treated; I came here to solve a problem I was having trouble with. It's none of your business how I deal with my own server on my own terms by myself; maybe I'm okay with the way my logic works out to deal with the situation, and that's not your problem. Put aside your differences in opinion with mine, as I have yours, and let's get back to that original problem.[/quote] Very classy... [QUOTE=Maurdekye;47304778]He was not presenting me with suggestions; he was attempting to prevent me from chasing this goal at all. I would not call that constructive under any defintion.[/QUOTE] He's preventing you from trying to solve the same problems that have already been solved, and running the same loops he's already run. [QUOTE=Maurdekye;47304778]I am not attempting to prevent propkilling; players are allowed to take part in it as much as they please. My "punishments" are simply tweaks to the player's personal environment to put them on fairer grounds with other players that they are killing. The same goes for players who opt to shoot others; they are allowed, but they are "punished", so to speak, so that they are on a more level playing field with those that they are fighting. The situation is more fair this way.[/QUOTE] If the only outcome of an event is a negative "correctional" one, why even have it at all. It serves no beneficial purpose. Pretty much what you are telling us is that you "can" propkill or shoot, but if you do, then you will be punished.
[QUOTE=Revenge282;47304862]Very classy... [/QUOTE] Indeed. [QUOTE=Revenge282;47304862] He's preventing you from trying to solve the same problems that have already been solved, and running the same loops he's already run. [/QUOTE] He's never used my linked plugin in conjunction with a propkill detection script, now has he? My situation is significantly different, specifically in that I don't intend on kicking or banning people. [QUOTE=Revenge282;47304862] If the only outcome of an event is a negative "correctional" one, why even have it at all. It serves no beneficial purpose. Pretty much what you are telling us is that you "can" propkill or shoot, but if you do, then you will be punished.[/QUOTE] Because it's more fun to fight someone who is running around on the ground rather than invincible and noclipping through the walls, propkilling or not. [editline]11th March 2015[/editline] I'm just going to mark this thread as solved, because the method I've come up with is likely sufficient as an answer to my problem.
Sorry, you need to Log In to post a reply to this thread.