Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ropes cleanup #11

Open
adamnejm opened this issue Dec 15, 2023 · 1 comment · May be fixed by #16
Open

Add ropes cleanup #11

adamnejm opened this issue Dec 15, 2023 · 1 comment · May be fixed by #16
Assignees

Comments

@adamnejm
Copy link
Contributor

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")
@Derpius
Copy link
Member

Derpius commented Dec 15, 2023

Definitely one we want. The less we're dependent on IsAdmin-gated cleanup functions the better

@adamnejm adamnejm self-assigned this Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants