blob: 27b2ed992fde4e8b123cb8ef7bc7f18cead597e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
hook.Add("PrePACConfigApply", "donators only", function(ply, outfit_data)
if not ply:IsSuperAdmin() then
return false, "give us money!"
end
end)
hook.Add( "PrePACEditorOpen", "RestrictToSuperadmin", function( ply )
if not ply:IsSuperAdmin( ) then
return false
end
end )
util.AddNetworkString("requestpac")
util.AddNetworkString("responsepac")
--be able to stream pac data to clients on-demand
net.Receive("requestpac",function(ln,ply)
local name = net.ReadString()
local pdata = file.Read(string.format("artery/pac/%s.txt",name)) --make sure to have the .txt, so dot-dot-slash attacks can't read the mysql file.
net.Start("responsepac")
net.WriteString(pdata)
net.Send(ply)
end)
hook.Add("PlayerInitialSpawn", "AllowPacThings",function(ply)
--pac.SetupENT(ply, false)
PrintTable(pac)
end)
|