Ulysses

Ulysses Stuff => General Chat & Help and Support => Topic started by: emilhem on December 23, 2012, 06:59:10 AM

Title: ULib.ucl.addUser VS. game.ConsoleCommand( "ulx adduserid [id] [rank]")
Post by: emilhem on December 23, 2012, 06:59:10 AM
What's the difference?

ULib.ucl.addUser(ply:SteamID(), {}, {}, ply.promote)

-- vs --

game.ConsoleCommand( "ulx adduserid "..ply:SteamID().." "..ply.promote)


or is there an even better way?
Title: Re: ULib.ucl.addUser VS. game.ConsoleCommand( "ulx adduserid [id] [rank]")
Post by: JamminR on December 23, 2012, 07:28:25 AM
Ulib.ucl.addUser is more raw.
It doesn't require the TINY bit more overhead of ULX checks/balances.
It would be the most efficient way (if wanting ULib to control your group access)
It wouldn't log to your ULX logs "Console added user to group"

game.ConsoleCommand method requires ULX, so therefore, has a nano-milliseconds of overhead.
Logs to the ULX log files.
Also, you don't show it, it requires a line feed after the command "\n" (true if you're running a ULX command or not)

Those are the differences I can think of.