Skip to content

Add ropes cleanup #11

@adamnejm

Description

@adamnejm
if SERVER then
	function ulx.ropes(ply)
		for k,v in pairs(ents.FindByClass("keyframe_rope")) do
			if v.Ent1 and v.Ent1:IsWorld() and v.Ent2 and v.Ent2:IsWorld() then v:Remove() end
		end
		
		ulx.fancyLogAdmin(ply, "#A removed all the world ropes")
	end
end

local cmd = ulx.command("Cleanup", "ulx ropes", ulx.ropes, "!ropes")
cmd:defaultAccess(ULib.ACCESS_ADMIN)
cmd:help("Removes all the world ropes")

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions