Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ulx.dksnr(calling_ply, target_plys)
- for _, v in pairs( target_plys ) do
- if v.totalz == 3 then
- ULib.ban(v, 10080, "[Auto SNR] One week ban for RDM.")
- ULib.tsayError( nil, v:Nick() .. " was auto banned for one week, too much RDM.", true )
- ulx.warn(calling_ply, v, "[Auto SNR] 3/3 warnings (one week ban).")
- --ULib.kick(v, "Too much RDM.") --For Bot Testing.
- return
- end
- if v.snr then
- ULib.tsayError( calling_ply, v:Nick() .. " is already being slain by " .. v.snrby, true )
- else
- if v.totalz == nil then
- v.totalz = 1
- end --if
- v.snr = true
- v.snrby = calling_ply:IsValid() and calling_ply:Nick() or "(Console)"
- ULib.tsayError( nil, v:Nick() .. " is being slain the following round for RDM. Warning ("..v.totalz.."/3)", true )
- end --if
- --[[ BROKEN
- hook.Add( "PlayerDisconnected", "RDM and Run "..v:Nick(), function()
- if v.totalz == 1 or v.totalz == 2 and v.snr then
- ULib.ban(v, 10080, "[Auto SNR] RDM and Run.")
- ulx.warn(calling_ply, v, "[Auto SNR] RDM and Runner (one week ban).")
- end
- end)
- ]]
- hook.Add("TTTBeginRound", "SNR "..v:Nick(), function()
- if v.snr then
- v:Kill()
- v.snr = nil
- v.snrby = nil
- v.totalz = v.totalz + 1
- ULib.tsayError( v,"You were slain for RDM last round. Read the !motd for server rules. Warning ("..v.totalz.."/3)", true )
- ulx.warn(calling_ply, v, "[Auto SNR] Warning / slayed.")
- end --if
- end) --function
- function snrdisconnect(v)
- if v.totalz == 2 and v.snr then
- ULib.ban(v, 10080, "[Auto SNR] RDM and Run.")
- ulx.warn(calling_ply, v, "[Auto SNR] RDM and Ran (one week ban).")
- end
- end
- hook.Add( "PlayerDisconnected", "snrdisconnect"..v:Nick(), snrdisconnect )
- end --for
- ulx.fancyLogAdmin( calling_ply, "#A is slaying #T the following round for RDM.", target_plys )
- end
- local _dksnr = ulx.command( CATEGORY_NAME, "ulx snr", ulx.dksnr, "!snr" )
- _dksnr:addParam{ type=ULib.cmds.PlayersArg }
- _dksnr:defaultAccess( ULib.ACCESS_ADMIN )
- _dksnr:help( "Slays target(s) the following round for RDM." )
Advertisement
Add Comment
Please, Sign In to add comment