blob: ee4eee6469ced6c4f0038f15f77b29558ae8a69e (
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
|
local sql = nrequire("core/database/sv_setup.lua")
local models = {}
for k = 1,9 do
models[#models + 1] = "models/player/Group01/male_0" .. k .. ".mdl"
models[#models + 1] = "models/player/Group02/Male_0" .. k .. ".mdl"
end
local function delayplayerload(ply)
if ply:Alive() then
sql.GetPlayerData(ply)
else
timer.Simple(1,function()
delayplayerload(ply)
end)
end
end
hook.Add("PlayerInitialSpawn","ArteryPlayerLoad",function(pl)
local modelnum = pl:UniqueID() % (#models)
timer.Simple(1,function()
delayplayerload(pl)
end)
pl:SetModel(models[modelnum])
pl:Give("hands")
pl:SelectWeapon("hands")
end)
|