Skip to content

Commit

Permalink
Kick players in hardcore mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiascode authored Mar 17, 2020
1 parent e99030b commit 5ce272a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 24 deletions.
13 changes: 13 additions & 0 deletions hardcore.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-- Implements the OnKilling hook handler that effectively implements the hardcore mode of the server

-- If the server is in hardcore mode, bans the killed player
function OnKilling(Victim, Killer)
if (Victim:IsPlayer()) then
if (cRoot:Get():GetServer():IsHardcore()) then
local Reason = "Killed in hardcore mode"

AddPlayerToBanlist(Victim:GetName(), Reason, "Server-Core")
KickPlayer(Victim:GetName(), Reason)
end
end
end
24 changes: 0 additions & 24 deletions onkilling.lua

This file was deleted.

0 comments on commit 5ce272a

Please sign in to comment.