Ulysses
General => Developers Corner => Topic started by: nexbr on June 20, 2013, 08:47:12 AM
-
Hi.
I want to do a Plugin, I Know Lua and Already did somethings with ULX and ULIB, I read some of the ULX Documentation, but I didn't figure out how to make this Plugin as I want to do.
I need create a ULX User Flag, that can be set on ULX Panel.
And i need make this Flag Global to I access it from Global Like: Player:IsAllowedToDoX().
-
To create access flags you use registerAccess (http://ulyssesmod.net/docs/files/lua/ulib/server/ucl-lua.html#ucl.registerAccess) (this gives it default permissions and registers it on XGUI) and ply:query(...) (http://ulyssesmod.net/docs/files/lua/ulib/shared/sh_ucl-lua.html#Player:query)
-
To create access flags you use registerAccess (http://ulyssesmod.net/docs/files/lua/ulib/server/ucl-lua.html#ucl.registerAccess) (this gives it default permissions and registers it on XGUI) and ply:query(...) (http://ulyssesmod.net/docs/files/lua/ulib/shared/sh_ucl-lua.html#Player:query)
Thanks but how exactly works query? Since it do not show any Args?
-
Ok, how i add a new ?registerAccess category? i typed a custom category and it do not show up.
-
i think i did wrong: ucl.registerAccess("ulx permXX", {"admin", "superadmin"}, "Give access to XX", "Other") it doesn't shows on Perm list.
Help!
-
I fixed, I was doing wrong on if. it is working now. Thanks!
Just one more question, This query is Gmod Default? I mean if there is no ulx or other admin mod it will give error? or it is overwrited like meta?
-
Querying accesses is unique to ULib, Gmod has no equivalent.
-
Thanks Megiddo. You helped me Much, Thanks. ;)