• Help with anti-RDM
    12 replies, posted
  • Avatar of sciaschi
  • for some reason i cant get this code to work, As is it doesnt work at all if someone can help me out i would be very greatful [lua] function CheckForRDM(victim, _, killer) if( !victim:Alive() ) then victim:Spawn() end end function RdmRegulate(victim, _, killer) if(victim:IsPlayer() && killer:IsPlayer()) then -- Check if they're both players (should be) if(!killer.LastKillTime) then killer.LastKillTime = CurTime() end -- Set Kill Time if not exist if(!killer.LastKillCount) then killer.LastKillCount = 0 end -- Set Kill counter if not exist if(!killer.LastKilled || killer.LastKilled != victim) then killer.LastKilled = victim killer.LastKillCount = 0 end if (victim:SteamID() == killer:SteamID()) then -- is the same person PrintMessage( HUD_PRINTTALK, (" Suicide!")) end if(killer.LastKillCount = victim ) then killer.LastKillCount = killer.LastKillCount + 1 -- Check if its the first time the killer kills someone if(killer.LastKillTime < CurTime() - 120 && killer.LastKilled == victim) then PrintMessage( HUD_PRINTTALK, (killer:Name().." has been arrested for RDM!")) -- Send text to all players chat! game.ConsoleCommand("rp_arrest "..killer:Name().." 160\n") killer.LastKillCount = killer.LastKillCount + 1 else if(killer.LastKillCount > 5 ) then -- If killer have killed less then 4 times then continue game.ConsoleCommand("kickid "..killer:UniqueID().." Kicked for RDM\n") else if(killer.LastKillCount > 6 ) then game.ConsoleCommand("banid ".. killer:UniqueID().." Banned for RDM\n") end end end end end end hook.Add("PlayerDeath", "RdmCheck", RdmRegulate) [/lua] oh and this isnt more of a help request its a request for someone to recode to work
  • Avatar of Amokov
  • No need to be an asshole about it, your question is stupid to begin with. Add debug prints, find where shit is going wrong, and fix it yourself. You'll learn more, and maybe you'll get some humility along the way.
  • Avatar of sciaschi
  • [QUOTE=Amokov;35561482]No need to be an asshole about it, your question is stupid to begin with. Add debug prints, find where shit is going wrong, and fix it yourself. You'll learn more, and maybe you'll get some humility along the way.[/QUOTE] Well its like saying "How do i set a color". Yes i have a basic understanding but i just needed someone to actually be even the slightest bit helpful.
  • Avatar of chazzball
  • Gmod rp is just stupid, there is a higher roleplay factor in l4d than in gmod rp. But lets not go off topic, there is no need for anti-rdm scripts as there is no real way of identifying if someone is killed in a raid, or killed randomly. You were going to use it for roleplay perposes, right? Because otherwise you can just disable pvp damage
  • Avatar of nick_9_8
  • [QUOTE=chazzball;35576154]Gmod rp is just stupid, there is a higher roleplay factor in l4d than in gmod rp. But lets not go off topic, there is no need for anti-rdm scripts as there is no real way of identifying if someone is killed in a raid, or killed randomly. You were going to use it for roleplay perposes, right? Because otherwise you can just disable pvp damage[/QUOTE] Jesus Christ, honestly, nobody cares about your opinion regarding DarkRP. Your post would be perfect if you didn't add in your pointless opinion. e And OP, this could be dangerous as something like a click before lag or crossfire could lead to a mis-ban. I suggest just using the Convar for excessive deathmatch in DarkRP.
  • Avatar of Micko9
  • [QUOTE=sciaschi;35562941]Well its like saying "How do i set a color". Yes i have a basic understanding but i just needed someone to actually be even the slightest bit helpful.[/QUOTE] Calling someone a dumbass, who tried to help means: [b]You aren't worthy of the replies of helpful people. Go somewhere else where people might appreciate being treated like garbage.[/b] My opinion: There's no way to prove that was RDM or not, only a brain can monitor a party of brain(s). That's why there's a thing called Active Administrators. Use those, and most kicks/bans will be valid. Use this, and you might get kicked while raiding a bunch of people. Speaking of which, this script does seem to be more like a anti-repetitive same person kill. It will probably kick/ban a guy who is raging at a RDMer and killing him constantly, instead of the RDMer him self.
  • Avatar of sciaschi
  • The point of it is it only works if the person kills the SAME person twice not 5 different people
  • Avatar of ExplosiveCheese
  • Honestly there is no real fool proof way to detect an rdm'er, like nick_9_8 said, it can be risky if a crossfire or lag spike occurs. Just enable death logs for the administrators so you can see who killed who. You'll have a better understanding of the situation, because you know who started the rdm.
  • Avatar of nick_9_8
  • [QUOTE=ExplosiveCheese;35881354]Honestly there is no real fool proof way to detect an rdm'er, like nick_9_8 said, it can be risky if a crossfire or lag spike occurs. Just enable death logs for the administrators so you can see who killed who. You'll have a better understanding of the situation, because you know who started the rdm.[/QUOTE] Exactly... I suggest using these people called 'Admins', they shall help you :)