• Print

Author Topic: creating ulx group thorugh lua  (Read 4628 times)

0 Members and 1 Guest are viewing this topic.

Offline dankpepe

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 1
creating ulx group thorugh lua
« on: May 08, 2016, 11:44:23 am »


    I'm trying to make a lua autorun script that creates a group called usor and inherits from superadmin. I have this:

    RunConsoleCommand( "ulx hide", "ulx addgroup", "usor superadmin" )

    It creates the usor group just fine, but it doesn't inherit from superadmin.


Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: creating ulx group thorugh lua
« Reply #1 on: May 08, 2016, 11:49:20 am »
"usor" and "superadmin" are separate arguments, and would need to be separated in the function call.

But, you should really use the API -- http://ulyssesmod.net/docs/files/lua/ulib/server/ucl-lua.html#ucl.addGroup
Experiencing God's grace one day at a time.

Offline dankpepe

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 1
Re: creating ulx group thorugh lua
« Reply #2 on: May 08, 2016, 12:15:54 pm »
How would I use the API? I've tried to use it, but it wasn't working. I have tried:

ULib.ucl.addGroup( usor, _ , superadmin, _ )

Offline Timmy

  • Ulysses Team Member
  • Sr. Member
  • *****
  • Posts: 252
  • Karma: 168
  • Code monkey
Re: creating ulx group thorugh lua
« Reply #3 on: May 08, 2016, 12:25:06 pm »
Code: Lua
  1. ULib.ucl.addGroup("usor", {}, "superadmin")
« Last Edit: May 08, 2016, 12:27:51 pm by Timmy »

Offline dankpepe

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 1
Re: creating ulx group thorugh lua
« Reply #4 on: May 08, 2016, 12:30:00 pm »
thank you

  • Print