General > Developers Corner

Fancylog

(1/1)

dankpepe:
Is there a page anywhere where I can learn about fancylog admin? I'm not exactly sure how to use it or the variables.

roastchicken:
I don't think there is any documentation for ULX functions, so it's unlikely there's a page about fancyLogAdmin. However another way you can learn about it is by looking at ULX's code. Just open up garrysmod/addons/ulx/lua/ulx/modules/sh/ and have a look around, you're likely to find a command that uses it. In addition you can look at the actual function in garrysmod/addons/ulx/lua/ulx/log.lua, line 409.

If you don't have a copy of ULX handy, you can view all of these things on GitHub:

ulx/lua/ulx/modules/sh/
ulx.fancyLogAdmin()

dankpepe:

--- Quote from: roastchicken on May 09, 2016, 05:07:40 AM ---I don't think there is any documentation for ULX functions, so it's unlikely there's a page about fancyLogAdmin. However another way you can learn about it is by looking at ULX's code. Just open up garrysmod/addons/ulx/lua/ulx/modules/sh/ and have a look around, you're likely to find a command that uses it. In addition you can look at the actual function in garrysmod/addons/ulx/lua/ulx/log.lua, line 409.

If you don't have a copy of ULX handy, you can view all of these things on GitHub:

ulx/lua/ulx/modules/sh/
ulx.fancyLogAdmin()

--- End quote ---

The problem I have though is the variables. The only thing I can figure out is #A is calling ply, #T is target ply. I can make a fancy log, I just can't set up how I would like with more variables.

iViscosity:
What I did is just looked at already existing code that uses the fancyLogAdmin (almost all commands do) and used that to sort of figure out what things mean. I believe #s references a table, and like you said before, #A = calling_ply (usually an Admin) and #T = target_ply.

Honestly though, those are really the only ones you'll need I think. Unless you're trying to go for a specific thing.

Megiddo:
Sorry, I know the missing documentation in ULX is a bummer. Fancylog works as you've outlined above. Anything other than #A or #T gets passed as %<keycode> to string.format -- http://www.lua.org/manual/5.1/manual.html#pdf-string.format.

Navigation

[0] Message Index

Go to full version