Как это переделать под ServerGuard?
if SERVER then
hook.Add("PlayerSay", "VidachaVip", function(ply, text)
if text == "!vip" then
if not file.Exists("freevip/"..ply:SteamID64()..".txt", "DATA") then
RunConsoleCommand("sg", "rank", ply:SteamID(), "vip", 1440)
ply:ChatPrint("[LegendLife] ".."Вы получили vip на 24 часа!")
file.CreateDir("freevip")
file.Write("freevip/" .. ply:SteamID64() .. ".txt", date)
else
ply:ChatPrint("[LegendLife] ".."Вы уже получали VIP!")
end
end
end)
end
if SERVER then
hook.Add("PlayerSay", "VidachaVip", function(ply, text)
if text == "!vip" then
if not file.Exists("freevip/"..ply:SteamID64()..".txt", "DATA") then
RunConsoleCommand("sg", "rank", ply:SteamID(), "vip", 1440)
ply:ChatPrint("[LegendLife] ".."Вы получили vip на 24 часа!")
file.CreateDir("freevip")
file.Write("freevip/" .. ply:SteamID64() .. ".txt", date)
else
ply:ChatPrint("[LegendLife] ".."Вы уже получали VIP!")
end
end
end)
end