• TTT The Hidden script
    4 replies, posted
Hey, So every once and a while on my server we've played a round or two of "The Hidden" where the T's are cloaked and then just have to do their job as usual. So now instead of having to do it manually everytime I'm trying to put it in a script and call ulx cloak and then use ulx give to give the T's a disguiser (or maybe another script so I can have one with and without disguisers) I'm just trying to figure out how to leverage ULX/Ulib (since I've done a bit of research and it seems to be in Ulib's /ulib/lua/ulib/server/player.lua file for the invis function. How would I go about doing it since I'm not sure if just doing [CODE]include("addons/ulib/lua/ulib/server/player.lua")[/CODE] would actually work or not... Still new to Gmod lua dev'n
Can you just use ulx cloak and ulx give from the server console? [url]http://wiki.garrysmod.com/page/Global/RunConsoleCommand[/url]
You don't need to include ulx in your script, it's automatically included. [editline]10th February 2015[/editline] [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Entity/SetMaterial]Entity:SetMaterial[/url] [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Player/Give]Player:Give[/url] Adding a new ulx command looks like this: [lua] local cmd = ulx.command( "category", "Command name", function, "Chat command" ) cmd:addParam{ type=ULib.cmds.PlayersArg } -- Command parameters, see link 1 cmd:defaultAccess( ULib.ACCESS_ADMIN ) -- The group that can use this command, see link 2 cmd:help( "Help text" ) [/lua] [url]https://github.com/Nayruden/Ulysses/blob/30955f86760c89205d344b273d02e67363854f0c/ulib/lua/ulib/shared/commands.lua[/url] [url]https://github.com/Nayruden/Ulysses/blob/30955f86760c89205d344b273d02e67363854f0c/ulib/lua/ulib/shared/defines.lua#L12[/url]
Ah cool I'll check into that But yeah I was actually trying to make a separate script outside of Ulx, but I guess I could just toss it inside as well
As long as it's shared it doesn't have to be in the ulx folder.
Sorry, you need to Log In to post a reply to this thread.