Garry's Mod

Garry's Mod

70 ratings
Automatic Cleanup
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Fun, Roleplay
File Size
Posted
364.000 B
16 Jun, 2018 @ 1:34pm
1 Change Note ( view )

Subscribe to download
Automatic Cleanup

Description
This (really little) script adds an automatic cleanup system to your server.
Someone requested for it: I don't know if it's currently available somewhere on the Workshop (I didn't find it), so I put mine.
The system uses a timer which is triggered every 1 minute, to avoid using a hook at every frame if you want a cleanup per hour.

You can set the time between every cleanup using the concommand called cleanup_time. You must put an integer value which represents the delay in MINUTES!

If you want to manage one cleanup per hour, then write cleanup_time 60 in your server.cfg.
20 Comments
Iris Joestar 11 Feb @ 8:16am 
so some how this was subscribed and i couldnt do anything, I dont remember subscribing to it
Nikotina 25 Jan @ 10:23am 
yo Advolt284. just try cleanup_time 0.1
Advolt284 [FR] 9 Aug, 2024 @ 5:08pm 
hello, any chance I can get a cleanup everysecond ?
Waks4f 20 Jul, 2024 @ 10:49am 
bro I think your game is haunted
Orion ☂☂ 8 Jun, 2024 @ 8:31am 
ive tried various commands in sevrer.cfg but i think im doing wrong ones
Orion ☂☂ 8 Jun, 2024 @ 8:28am 
is their a way to trigger a map cleanup on startup? i have a entity that keeps respawning itself tho its not persistent
Diablos  [author] 16 Apr, 2023 @ 8:59am 
I think they just restart their server at some point during the night. Thanks for the comment! Have a good day!
[ESC]Brendan1579 16 Apr, 2023 @ 8:31am 
thank you, you seem to be the only one with a tool like this which is insane to me. how do people run a 24/7 server on this game without a script for this?
Diablos  [author] 6 Dec, 2020 @ 1:41am 
Hello,
nah I no more make little scripts like this - but this is easy-to-do if you take the code of this workshop item and you use the ents.FindByClass function to say "if this is NOT THIS entity then you can clean up (by using :Remove() function).
Thanks,
KlutchxKay 4 Dec, 2020 @ 7:31pm 
Is there anything like this you could reccomend/make that ONLY despawns ragdoll corpses? I have an addon that spawns enemies every so often, and I don't want to clear everything, only the dead bodies. The corpses get very laggy. An addon that would only despawn ragdoll corpses would be awesome.