View difference between Paste ID: b0BdF2UP and q578QtGM
SHOW: | | - or go back to the newest paste.
1-
-------------------------------------
1+
2-
-- DIAMOND KROOKS SNR --
2+
3
		if v.totalz == 3 then
4
			ULib.ban(v, 10080, "[Auto SNR] One week ban for RDM.")
5
			ULib.tsayError( nil, v:Nick() .. " was auto banned for one week, too much RDM.", true )
6
			ulx.warn(calling_ply, v, "[Auto SNR] 3/3 warnings (one week ban).")
7-
			ULib.ban(v, 10080, "[Auto SNR] One week ban for too much RDM.")
7+
8
			return
9
		end
10
		if v.snr then
11
			ULib.tsayError( calling_ply, v:Nick() .. " is already being slain by " .. v.snrby, true )
12
		else
13
			if v.totalz == nil then
14
				v.totalz = 1 
15
			end --if
16
			v.snr = true
17
			v.snrby = calling_ply:IsValid() and calling_ply:Nick() or "(Console)"
18-
			ULib.tsayError( v, v:Nick() .. " is being slain the following round for RDM. Warning ("..v.totalz.."/3)", true )
18+
			ULib.tsayError( nil, v:Nick() .. " is being slain the following round for RDM. Warning ("..v.totalz.."/3)", true )
19
		end --if
20
21-
			if v.totalz == 1 and v.snr then
21+
		--[[ BROKEN
22-
				ULib.ban(v, 0, "[Auto SNR] RDM and Run.")
22+
23-
				--ULib.kick(v, "Too much RDM.") --For Bot Testing
23+
			if v.totalz == 1 or v.totalz == 2 and v.snr then
24
				ULib.ban(v, 10080, "[Auto SNR] RDM and Run.")
25
				ulx.warn(calling_ply, v, "[Auto SNR] RDM and Runner (one week ban).")
26
			end
27
		end)
28
		]]
29
		hook.Add("TTTBeginRound", "SNR "..v:Nick(), function()
30
			if v.snr then
31
				v:Kill()
32
				v.snr = nil
33
				v.snrby = nil
34
				v.totalz = v.totalz + 1
35
				ULib.tsayError( v,"You were slain for RDM last round. Read the !motd for server rules. Warning ("..v.totalz.."/3)", true )
36
				ulx.warn(calling_ply, v, "[Auto SNR] Warning / slayed.")
37
			end --if
38
		end) --function
39
40
		function snrdisconnect(v)
41
			if v.totalz == 2 and v.snr then
42
				ULib.ban(v, 10080, "[Auto SNR] RDM and Run.")
43
				ulx.warn(calling_ply, v, "[Auto SNR] RDM and Ran (one week ban).")
44
			end
45
		end
46
		hook.Add( "PlayerDisconnected", "snrdisconnect"..v:Nick(), snrdisconnect )
47
		
48
	end --for
49
	ulx.fancyLogAdmin( calling_ply, "#A is slaying #T the following round for RDM.", target_plys )
50
end
51
local _dksnr = ulx.command( CATEGORY_NAME, "ulx snr", ulx.dksnr, "!snr" )
52
_dksnr:addParam{ type=ULib.cmds.PlayersArg }
53
_dksnr:defaultAccess( ULib.ACCESS_ADMIN )
54
_dksnr:help( "Slays target(s) the following round for RDM." )