mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 21:53:46 +03:00
33 lines
865 B
Lua
33 lines
865 B
Lua
--[[
|
|
| This file was obtained through the combined efforts
|
|
| of Madbluntz & Plymouth Antiquarian Society.
|
|
|
|
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
|
| Maloy, DrPepper10 @ RIP, Atle!
|
|
|
|
|
| Visit for more: https://plymouth.thetwilightzone.ru/
|
|
--]]
|
|
|
|
|
|
util.AddNetworkString("NPCSpawner_Edit")
|
|
|
|
net.Receive("NPCSpawner_Edit", function(_, client)
|
|
if (client:IsAdmin()) then
|
|
local spawner = net.ReadEntity()
|
|
local bEnabled = net.ReadBool()
|
|
local sClass = net.ReadString()
|
|
local fPlayerNoSpawnRange = net.ReadFloat()
|
|
local fMaxNPCs = net.ReadFloat()
|
|
local fSpawnInterval = net.ReadFloat()
|
|
|
|
spawner:SetEnabled(bEnabled)
|
|
spawner:SetNPCClass(sClass)
|
|
spawner:SetPlayerNoSpawnRange(fPlayerNoSpawnRange)
|
|
spawner:SetMaxNPCs(fMaxNPCs)
|
|
spawner:SetSpawnInterval(fSpawnInterval)
|
|
|
|
spawner:SetupTimer(bEnabled)
|
|
|
|
ix.saveEnts:SaveEntity(spawner)
|
|
end
|
|
end) |