1. Post #1
    sciaschi's Avatar
    March 2011
    76 Posts
    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

    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)
    

    oh and this isnt more of a help request its a request for someone to recode to work
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Dumb Dumb x 1 (list)

  2. Post #2
    metromod.net
    _Chewgum's Avatar
    April 2010
    2,216 Posts
    sbox_plpldamage 0
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Dumb Dumb x 4 (list)

  3. Post #3
    sciaschi's Avatar
    March 2011
    76 Posts
    sbox_plpldamage 0
    Its already 0 dumbass
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Funny Funny x 9Dumb Dumb x 1Artistic Artistic x 1 (list)

  4. Post #4
    Amokov's Avatar
    October 2010
    282 Posts
    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.
    Reply With Quote Edit / Delete Reply Linux United States Show Events Dumb Dumb x 3Agree Agree x 1 (list)

  5. Post #5
    sciaschi's Avatar
    March 2011
    76 Posts
    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.
    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.
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Dumb Dumb x 1Funny Funny x 1 (list)

  6. Post #6
    "The superior man understands what is right; the inferior man understands what will sell"
    Chessnut's Avatar
    August 2011
    3,516 Posts
    There's a wonderful thing called decent administrators.
    Reply With Quote Edit / Delete Reply United States Show Events Zing Zing x 4Agree Agree x 1Winner Winner x 1 (list)

  7. Post #7
    chazzball's Avatar
    May 2007
    84 Posts
    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
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Dumb Dumb x 1 (list)

  8. Post #8
    sciaschi's Avatar
    March 2011
    76 Posts
    well i did and it didnt work. it just overrides it anyway

  9. Post #9
    I call in friends to rate KatNotDinner dumb (lol)
    nick_9_8's Avatar
    December 2011
    1,651 Posts
    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
    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.

  10. Post #10
    Micko9's Avatar
    August 2009
    65 Posts
    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.
    Calling someone a dumbass, who tried to help means:
    You aren't worthy of the replies of helpful people. Go somewhere else where people might appreciate being treated like garbage.

    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.

  11. Post #11
    sciaschi's Avatar
    March 2011
    76 Posts
    The point of it is it only works if the person kills the SAME person twice not 5 different people

  12. Post #12
    ExplosiveCheese's Avatar
    June 2010
    1,593 Posts
    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.

  13. Post #13
    I call in friends to rate KatNotDinner dumb (lol)
    nick_9_8's Avatar
    December 2011
    1,651 Posts
    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.
    Exactly... I suggest using these people called 'Admins', they shall help you :)
    Reply With Quote Edit / Delete Reply Windows 7 Australia Show Events Agree Agree x 1 (list)