ULX

Author Topic: Help With Plugin  (Read 2681 times)

0 Members and 1 Guest are viewing this topic.

Offline nexbr

  • Jr. Member
  • **
  • Posts: 55
  • Karma: 5
Help With Plugin
« 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().

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Help With Plugin
« Reply #1 on: June 20, 2013, 08:52:24 AM »
To create access flags you use registerAccess (this gives it default permissions and registers it on XGUI) and ply:query(...)
Experiencing God's grace one day at a time.

Offline nexbr

  • Jr. Member
  • **
  • Posts: 55
  • Karma: 5
Re: Help With Plugin
« Reply #2 on: June 20, 2013, 08:55:26 AM »
To create access flags you use registerAccess (this gives it default permissions and registers it on XGUI) and ply:query(...)

Thanks but how exactly works query? Since it do not show any Args?

Offline nexbr

  • Jr. Member
  • **
  • Posts: 55
  • Karma: 5
Re: Help With Plugin
« Reply #3 on: June 20, 2013, 09:26:44 AM »
Ok, how i add a new ?registerAccess category? i typed a custom category and it do not show up.

Offline nexbr

  • Jr. Member
  • **
  • Posts: 55
  • Karma: 5
Re: Help With Plugin
« Reply #4 on: June 20, 2013, 10:12:33 AM »
i think i did wrong: ucl.registerAccess("ulx permXX", {"admin", "superadmin"}, "Give access to XX", "Other") it doesn't shows on Perm list.

Help!

Offline nexbr

  • Jr. Member
  • **
  • Posts: 55
  • Karma: 5
Re: Help With Plugin
« Reply #5 on: June 20, 2013, 10:53:12 AM »
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?

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Help With Plugin
« Reply #6 on: June 20, 2013, 11:56:34 AM »
Querying accesses is unique to ULib, Gmod has no equivalent.
Experiencing God's grace one day at a time.

Offline nexbr

  • Jr. Member
  • **
  • Posts: 55
  • Karma: 5
Re: Help With Plugin
« Reply #7 on: June 20, 2013, 12:37:26 PM »
Thanks Megiddo. You helped me Much, Thanks.  ;)