mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 13:53:45 +03:00
Upload
This commit is contained in:
39
gamemodes/ixhl2rp/plugins/vj_spawner_disabler.lua
Normal file
39
gamemodes/ixhl2rp/plugins/vj_spawner_disabler.lua
Normal file
@@ -0,0 +1,39 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
local PLUGIN = PLUGIN
|
||||
|
||||
PLUGIN.name = "VJ Spawner Disabler"
|
||||
PLUGIN.author = "M!NT"
|
||||
PLUGIN.description = "Disables the VJ NPC spawner."
|
||||
|
||||
|
||||
if (SERVER) then
|
||||
ix.log.AddType("unprotectedVJNetCall", function(client)
|
||||
return string.format("%s is trying to abuse unprotected VJ net calls.", client:Name())
|
||||
end, FLAG_DANGER)
|
||||
|
||||
timer.Simple(10, function()
|
||||
net.Receive("vj_npcspawner_sv_create", function(len, ply)
|
||||
ply:Kick("Nice try :)")
|
||||
ix.log.Add(ply, "unprotectedVJNetCall")
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
||||
hook.Add("OnEntityCreated", "DisableVJSpawner", function( ent )
|
||||
if (ent:GetClass() == "obj_vj_spawner_base") then
|
||||
ent:Remove()
|
||||
end
|
||||
end)
|
||||
|
||||
timer.Simple(10, function()
|
||||
concommand.Remove("vj_cleanup")
|
||||
end)
|
||||
Reference in New Issue
Block a user