Just not a support question, a learning lua question.
I use shells anti-rdm sytem for my server, and want to change it to kick players after a certain amount of RDMs.
Here is my current setting.
[CODE]if PENALTYCALC==true then
if IsValid(attacker) and IsValid(victim) then
if attacker.IsTraitor~=nil then
if victim.IsTraitor~=nil then
if ((attacker~=victim) and ((attacker:IsTraitor()==true and victim:IsTraitor()==true) or (attacker:IsTraitor()==false and victim:IsTraitor()==false) or (attacker:IsDetective()==true and victim:IsTraitor()==false) or (attacker:IsTraitor()==false and victim:IsDetective()==true))) and victim.markedtodeath==nil then
if victim.candamage~=nil then
print("PENALTY: "..attacker:GetName().." on "..victim:GetName().." BUT THIS KILLING WAS ALLOWED! No penalty counted.")
else
attacker.markedtodeath=true
print("PENALTY: "..attacker:GetName().." on "..victim:GetName())
attacker:PrintMessage(HUD_PRINTTALK,"PENALTY: You will be slayed on next round for teammate killing.")
victim:PrintMessage(HUD_PRINTTALK,"Sorry for that. You was a victim of a RDM or an accident from player '"..attacker:GetName().."'. You can forgive this player's penalty by writing 'pardon' on chat until a new round starts.")
victim.pardon=attacker
if attacker.penalty==nil then attacker.penalty=0 end
attacker.penalty=attacker.penalty+3
if attacker.penalty>=3 then
attacker:(5,function() v:local kick() end)
for k,v in pairs(player.GetAll()) do
v:PrintMessage(HUD_PRINTTALK,attacker:GetName().." was slayed due RDM.")[/CODE]
I was just wondering, do I use the local kick, or do I use the game.Server lua code. I really wan't the answer for this is because I was just beginning a new addon called Anti Abuse for donators, and just need to know what commands to use for ban and what not.
Sorry, you need to Log In to post a reply to this thread.