Ulysses Stuff > Releases

Freeze all props

(1/1)

Son_Of_Flynn:
A simple small script to freeze every prop on your server.
Great way to reduce lag and prevent prop spammers.

To install simply drop the file into your addons folder.

Raw Code:

--- Code: ---function ulx.freezeprops( calling_ply )
        local Ent = ents.FindByClass("prop_physics")
                for _,Ent in pairs(Ent) do
                        if Ent:IsValid() then
                                local phys = Ent:GetPhysicsObject()
                                phys:EnableMotion(false)
                        end
                end
        ulx.fancyLogAdmin( calling_ply, "#A froze all props" )
end
local freezeprops = ulx.command( CATEGORY_NAME, "ulx freezeprops", ulx.freezeprops, "!freezeprops" )
freezeprops:defaultAccess( ULib.ACCESS_ADMIN )
freezeprops:help( "Freeze every prop on the server." )

--- End code ---

Raimondas Ivaska:
Commands ?

JamminR:
If you'd taken the 10 seconds to look at the bit of code, EVEN if you have no idea how to code, you could have guessed with 80% or more accuracy the name of the command needed.
ulx freezeprops

That being said, this code won't work without adding it to another file that already exists.
There's an undeclared variable in the code for the ULX command setup.

Navigation

[0] Message Index

Go to full version