Alright, so I got this weird ass error.
[IMG]https://i.gyazo.com/39b4b08bd4a559338fbb4cc7656b8e9a.png[/IMG]
Here's the code:
[code]
--
-- Copyright (c) 2016 by Aegis Computing. All Rights Reserved.
--
local command = {}
command.ID = 1
command.ChatCommand = amod.Prefix.."kick";
function amod.chatKick(ply, text)
local text = string.lower(text);
if(string.sub(text, 0, string.len(command.ChatCommand))== command.ChatCommand) then
local text = string.Explode(" ", text)
if amod.IsAdmin(ply) then
local victim = amod.FindPlayer(ply, text[2])
if victim == nil then
return
end
local reason = table.concat({text}, " ", 3)
if ply:GetNWBool("amod_phased")== true then
victim:Kick("Kicked by "..ply:Nick().."! Reason: "..reason)
return '';
end
amod.ChatAdd("All", Color(0, 150, 255, 255), "[Server] ", amod.AdminColor, ply:Nick(), Color(255, 255, 255, 255), " has kicked ", amod.TargetColor, victim:Nick(), Color(255, 255, 255, 255), "! Reason: "..reason)
victim:Kick("Kicked by "..ply:Nick().."! Reason: "..reason)
else
amod.ChatAdd(ply, Color(255, 0, 0, 255). "[Server] ", Color(255, 255, 255, 255), "Error, you do not have access to this command!")
return ''
end
return ''
end
end
hook.Add("PlayerSay", "amodChatKick", amod.chatKick)
[/code]
Yes, all the amod shit is defined.
Sorry, you need to Log In to post a reply to this thread.