Ulysses

Ulysses Stuff => Releases => Topic started by: roastchicken on July 11, 2014, 04:50:29 AM

Title: [Fun] SetSpeed - Set individual player's running speed!
Post by: roastchicken on July 11, 2014, 04:50:29 AM
Hey guys,

This is just a small ulx module that I hacked together for use on my own server. I don't actually know how to give you guys an easy way to put it on your server. I just added at the end of fun.lua, because I'm a rebel (seriously guys how do I do this? this seems really hackey.)

Anyways just copy and paste it to the end of your fun.lua or someone can explain to me how ulx modules should be added on.

Code: [Select]
------------------------------ Speed ------------------------------
function ulx.runspeed( calling_ply, target_plys, amount )
        for i=1, #target_plys do
                target_plys[ i ]:SetRunSpeed( amount )
        end
        ulx.fancyLogAdmin( calling_ply, "#A set the running speed for #T to #i", target_plys, amount )
end
local runspeed = ulx.command( CATEGORY_NAME, "ulx runspeed", ulx.runspeed, "!runspeed" )
runspeed:addParam{ type=ULib.cmds.PlayersArg }
runspeed:addParam{ type=ULib.cmds.NumArg, min=250, max=2000, hint="runspeed", ULib.cmds.round }
runspeed:defaultAccess( ULib.ACCESS_ADMIN )
run speed:help( "Sets the running speed for target(s)." )
Title: Re: [Fun] SetSpeed - Set individual player's running speed!
Post by: Fanney on July 11, 2014, 10:27:56 AM
I just added at the end of fun.lua, because I'm a rebel (seriously guys how do I do this? this seems really hackey.)
Just create an own addon folder in addons and add the lua file in <youraddon>/lua/ulx/modules/sh/name.lua.

And then you can just insert it there and have it loaded by ULX.


B2T:
It's a lil simple thing, how about multiple commands regarding fun?