Author Topic: How can I change the default group?  (Read 2294 times)

0 Members and 1 Guest are viewing this topic.

Offline DiscoBiscuit

  • Full Member
  • ***
  • Posts: 112
  • Karma: 1
    • DiscoBuild
How can I change the default group?
« on: July 07, 2010, 05:11:06 PM »
I am about to do something horrible and need to know if it's possible to change the default group from 'user' to something else.
Using SVN

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: How can I change the default group?
« Reply #1 on: July 07, 2010, 06:38:21 PM »
The default group ('user') is actually from garry's code here: http://luabin.foszor.com/code/lua/includes/extensions/player_auth.lua#102
Experiencing God's grace one day at a time.

Offline DarKevin

  • Newbie
  • *
  • Posts: 23
  • Karma: 1
  • sup
Re: How can I change the default group?
« Reply #2 on: June 05, 2013, 10:51:06 AM »
Hi,
I would like to change the default user group that people get assigned to when joining the server, while playing.

It would be helpful, for example when we decide to roleplay,
using an rp_user group that can not spawn anything.
Normally I would have to change everyone and all new joinging players manually.
But if I could change the default group ingame,
players would spawn in the rp_user group that I want them to be in.

Is that possible with a command or with a simple script?
PS: It would also be cool, if I could regulary change the group, but for multiple or all players at once.
So I wont have to do ulx adduser twenty times.

Thank you!

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: How can I change the default group?
« Reply #3 on: June 05, 2013, 11:33:38 AM »
This is still something you would change in Garry's code or write a script to set the group in a high priority hook.

Where the code is: https://github.com/garrynewman/garrysmod/blob/master/garrysmod/lua/includes/extensions/player_auth.lua#L97
Experiencing God's grace one day at a time.