Hello. I'm looking for an addon like this: [url]https://www.gmodstore.com/scripts/view/1048/permanent-remover[/url], I would buy this but I can't for obvious reasons. I looked on the workshop and could not find an addon similar. And personally, I don't want to create a map edit, as that's annoying. If anyone knows of an addon that functions like this, it would be greatly appreciated :).
Thanks!
[url]http://gmodstore.com/jobs[/url] -- here you will find someone willing to make this for you
I'll make this tonight and upload it on the workshop/github. I'll post when it's up.
Not really worth selling imo.
Here you go.
[code]
local allowedGroups = {"superadmin", "owner"} --add more usergroups here, these groups will be allowed to remove props
if not file.IsDir("perm_removed_props", "DATA") then
file.CreateDir("perm_removed_props")
end
if not file.Exists("perm_removed_props/list.txt", "DATA") then
file.Write("perm_removed_props/list.txt", "")
end
hook.Add("PlayerSay", "banProp", function(ply, text, teamChat)
text = string.lower(text)
if string.sub(text, 1, 11) == "!permremove" or string.sub(text, 1, 11) == "/permremove" then
if table.HasValue(allowedGroups, ply:GetUserGroup()) then
local ent = ply:GetEyeTrace().Entity
if IsValid(ent) and ent:MapCreationID() > -1 then
file.Append("perm_removed_props/list.txt", tostring(ent:MapCreationID()).." | "..tostring(ent:GetClass()).." | "..tostring(ent:GetPos()).." | "..tostring(os.date("%H:%M - %m/%d/%Y" , os.time())).."\n") --american format
ent:Remove()
end
end
return ""
end
end)
hook.Add("InitPostEntity", "removeBannedProps", function()
local fileData = file.Read("perm_removed_props/list.txt")
local fileLines = string.Explode("\n", fileData)
for k, line in ipairs(fileLines) do
entData = string.Explode(" | ", line)
entID = entData[1]
if tonumber(entID) then
removingEnt = ents.GetMapCreatedEntity(tonumber(entID))
end
if IsValid(removingEnt) then
removingEnt:Remove()
end
end
end)
[/code]
Not sure it deserves a workshop upload in on its own, but it could be handy. I'll upload it probs tomorrow.
I hereby present you RemoveProps, an addon created by the author of PermaProps: [url]http://steamcommunity.com/sharedfiles/filedetails/?id=488122182[/url]
Thanks for the responses, it's appreciated.
Sorry, you need to Log In to post a reply to this thread.