This will restore the map to what it was when the map was loaded.
I made this because i needed it for a machinima i am working on, so i obviously use it to reset all the NPC's and stuff when i need to so i can refilm, but what makes this special is that it also removes the NPC ragdolls which i couldnt find a addon that did, or atleast one that worked after the patch that made the ragdolls clientside only.
Also, im sorry if the code if bad or anything but this is basically my 1st day of doing lua and ive been working on this for like 10+ hours straight >.<.
[highlight]-=Changelog=-[/highlight]
[b]1.2 - 21 August 2009[/b]
[list]
[*]Remove some print lines i forgot to remove.
[*]Added some print lines to show success.
[*]Added: "clean_up_client" which will remove dead NPC ragdolls from the person who called the command.
[/list]
[b]1.1 - 20 August 2009[/b]
[list]
[*]Made the command admin only.
[*]Command now removes client-side ragdolls.
[/list]
[b]1.0 - 20 August 2009[/b]
[list]
[*]First release.
[/list]
[highlight]-=Download=-[/highlight]
[url=http://www.garrysmod.org/downloads/?a=view&id=76823][img]http://www.garrysmod.org/img/?t=dll&id=76823[/img][/url]
Not bad, but why is the clientside cleanup admin only?
[QUOTE=Overv;16820662]Not bad, but why is the clientside cleanup admin only?[/QUOTE]
The only thing that is client side is to remove the ragdolls.
EDIT: but i guess i could make it so anyone can clean up thier own client ragdolls if i update it.
So if a door gets physgunned does this fix that?
[QUOTE=noobcake;16822644]So if a door gets physgunned does this fix that?[/QUOTE]
Didnt try it but it should do i guess.
Type lua_reloadents in the console but it will lag for abit or download this [url]http://www.garrysmod.org/downloads/?a=view&id=74066[/url] and then all you have is type lua_reloadent and then the name of what you want to reload and there will be no lag at all.
Edit:
oh and if its a script like this you use lua_openscript and then the path of the script.
[url]http://www.garrysmod.org/downloads/?a=view&id=29053[/url]
This gets rid of npc ragdolls.
Yeah but thats a autorun script with fancy effects that will unnessecarily use resources. It should just be done with hooks instead.
[QUOTE=wiki.garrysmod.com]
[code]function CleanUp()
game.CleanUpMap()
end
concommand.Add("clean_up", CleanUp)[/code]
[/QUOTE]
Nice cp work here.
[QUOTE=The-Stone;16829563]Nice cp work here.[/QUOTE]
Haha was going to quote the same thing. :buddy:
[QUOTE=lefundoof;16824728][url]http://www.garrysmod.org/downloads/?a=view&id=29053[/url]
This gets rid of npc ragdolls.[/QUOTE]
That doesnt clean up ragdolls online because the ragdolls are client side only now since that patch, thats why i made this.
And -TB- thx, that will help loads.
[editline]12:47PM[/editline]
[QUOTE=The-Stone;16829563]Nice cp work here.[/QUOTE]
CP?
[QUOTE=Super_Sonic;16831722]That doesnt clean up ragdolls online because the ragdolls are client side only now since that patch, thats why i made this.
And -TB- thx, that will help loads.
[editline]12:47PM[/editline]
CP?[/QUOTE]
Copy&Paste
Thank you. The Clean Map feature built in never worked as well as I'd like it.
[QUOTE=Mjr.Tonykins;16845186]Thank you. The Clean Map feature built in never worked as well as I'd like it.[/QUOTE]
np :)
A recent update might of broken this (some SendLUA errors when using clientside command) and it doesn't work overall. A temp fix for this is lua_run game.CleanUpMap() which works exactly the same.
A gmod restart has seemed to fix it, oh well.
Sorry, you need to Log In to post a reply to this thread.