ULX

Author Topic: Ulx team ID # location  (Read 2090 times)

0 Members and 2 Guests are viewing this topic.

Offline killforfun

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 1
Ulx team ID # location
« on: May 23, 2014, 02:49:29 AM »
I've seen that the Groups have an index parameter only that does not seem to work when used in my script.
example ply:SetTeam( index number here )
I'm aware that I could use ulx.adduser(ply,target,"group name here) though when using that ulx will echo "User has added namehere to group whatever" and i'd rather not see the echo. So where/how can I get the team ID numbers  :o

Thanks!


Offline Decicus

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 81
    • Alex Thomassen
Re: Ulx team ID # location
« Reply #1 on: May 23, 2014, 04:05:05 AM »
If I understood you right, you can technically use ucl.addUser instead of "ulx.adduser".
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Ulx team ID # location
« Reply #2 on: May 23, 2014, 01:30:35 PM »
Teams and Groups are NOT the same.

Setting someone's team may make them appear to be in a group, but their group will have not changed.

Using UCL.addUser will indeed change their group (and probably not their team until they reconnect) and it shouldn't echo anything.

Offline killforfun

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 1
Re: Ulx team ID # location
« Reply #3 on: May 23, 2014, 03:45:23 PM »
I keep getting "...attempt to index global 'ucl (a nil value) Kill for fun:!minge bot"
Do i need to save the file somewhere other then the ulx/modules/sh directory or do i need to include a file?  ???

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Ulx team ID # location
« Reply #4 on: May 23, 2014, 08:54:42 PM »
ucl is part of the ULib library. So you would call the function like this:

ULib.ucl.addUser

Offline killforfun

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 1
Re: Ulx team ID # location
« Reply #5 on: May 24, 2014, 12:08:07 AM »
Now how could I go about linking this with the ulx command API?

Code: [Select]
local CATEGORY_NAME = "User Management"

function ulx.addUser(ply, minge)
   ULib.ucl.addUser( ply:SteamID(), {}, {}, minge  )
//ulx.adduser(ply,target,"minge")
end