ULX

Author Topic: UTeam - Set teams based on usergroup.  (Read 319710 times)

0 Members and 7 Guests are viewing this topic.

Offline Chironex

  • Full Member
  • ***
  • Posts: 197
  • Karma: 11
  • Formerly known as Kyzer
Re: UTeam - Set teams based on usergroup.
« Reply #75 on: March 08, 2008, 09:24:53 AM »
No it will not work, viewing this file: http://code.garrysmod.com/?show=/garrysmod/lua/includes/modules/player_manager.lua#6
customs skins will not be detected.

So Fate, you need to edit UTeam:

In UTeam.lua, locate this line
Code: [Select]
if v.model then timer.Simple( 0.1, ply.SetModel, ply, player_manager.TranslatePlayerModel( v.model ) ) end
and replace it with:
Code: [Select]
if v.model then timer.Simple( 0.1, ply.SetModel, ply, v.model ) end

And now, in the UTeam config file, you will need to change all models to their real file names.

Ex:
Before:
Code: [Select]
"model"    "super"

After:
Code: [Select]
"model"    "models/player/combine_super_soldier.mdl"

(follow the link at the begining of this post, for a list of default player models.)
         
         

Typo Hui

  • Guest
Re: UTeam - Set teams based on usergroup.
« Reply #76 on: March 16, 2008, 03:53:56 PM »
Does anybody know how to add more teams than 4, when I tried it didn't work. Thanks! :-[

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: UTeam - Set teams based on usergroup.
« Reply #77 on: March 16, 2008, 04:24:45 PM »
Does anybody know how to add more teams than 4, when I tried it didn't work. Thanks! :-[

What do you mean? I've seen Gman4President's server, and Beast Build server, with several different groups/teams in sui_scoreboard listings, and text color chat.
What isn't working? I just tried finding a limit on Google, and couldn't (but I didn't take more than a minute to search)
Keep the following in mind when you're trying to add;
Notes:
  • Usergroups can be set through Garry's default file (garrysmod/settings/users.txt), or through ULib/ULX.
  • Groups take priority based on their order(1 is highest priority). Set your teams based on decending group level so users don't get put on a lower team. (ie. If admin is before superadmin, superadmins will end up on admin team instead of superadmin team)
  • Use group "user" as your last team to catch everyone who wasn't put on another team.
UTeam_readme.txt
Code: [Select]
"teams"
{
"1" //Team index. Start at 1 and go up. Team priority lowest first.
{
"name" "Name" //Name of the team.
"group" "usergroup" //Usergroup required for the team. Works with garry's default and UCL.
"color" //The team's color
{
"r" "255" //Red value
"g" "100" //Green Value
"b" "0" //Blue Value
"a" "255" //Alpha Value
}
"hp" "500" //(*Optional*) Player's initial health.
"armor" "500" //(*Optional*) Player's initial armor.
"model" "gman" //(*Optional*) Player's model. (None if undefined, Kleiner if invalid) Valid models listed below
"plytable" //(*Optional*) Set values on the Player's table.
{ //Format is key:value

"1" "SprintSpeed:1000" //Set the player's sprint speed (Def. 500)
"2" "WalkSpeed:500" //Set the player's walk speed (Def. 250)
}
}
}
[/quote]
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Typo Hui

  • Guest
Re: UTeam - Set teams based on usergroup.
« Reply #78 on: March 16, 2008, 07:16:28 PM »
 ;D Thanks, I just got the program today and I know very little on ULX.
BTW: how do you make a person on your server higher ranked/ admin. Not sure how to do that.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: UTeam - Set teams based on usergroup.
« Reply #79 on: March 16, 2008, 07:43:14 PM »
Re:Uteam - You're welcome
Re:admin - please read the ulx_readme.txt ... if/when that doesn't answer your question, please explore this forum a little better... We have a FAQ (FREQUENTLY ASKED QUESTIONS) forum that I'm sure will answer any new questions you have.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Typo001

  • Newbie
  • *
  • Posts: 14
  • Karma: 0
    • My (Personal) Site
Re: UTeam - Set teams based on usergroup.
« Reply #80 on: March 16, 2008, 10:41:15 PM »
Ok, I did manage to make one group correctly, but when I added "owner", the unassigned problem came back. Could someone tell me what I did wrong:

My UTeam.Txt
Code: [Select]
"Out"
{
"teams"
{
"1"
{
"name" "Owner"
"group" "superadmin"
"armor" "1000"
"hp" "1000"
"color"
{
"a" "255"
"B" "255"
"g" "255"
"r" "255"
}
"plytable"
{
"1" "SprintSpeed:1000"
"2" "WalkSpeed:500"
}
}
"2"
{
"name" "Moderator"
"group" "owner"
"armor" "1000"
"hp" "1000"
"color"
{
"a" "255"
"B" "0"
"g" "240"
"r" "222"
}
}
"3"
{
"name" "HIGHLY Respected"
"group" "admin"
"armor" "500"
"hp" "500"
"color"
{
"a" "255"
"B" "50"
"g" "50"
"r" "255"
}
}
"4"
{
"name" "Members"
"group" "operator"
"armor" "200"
"hp" "200"
"color"
{
"a" "255"
"B" "254"
"g" "172"
"r" "61"
}
}
"5"
{
"name" "N00b"
"group" "n00b"
"armor" "0"
"hp" "50"
"color"
{
"a" "255"
"B" "127"
"g" "127"
"r" "127"
}
}
"6"
{
"name" "Guest"
"group" "user"
"color"
{
"a" "255"
"B" "138"
"g" "0"
"r" "135"
}
}
"gamemodes"
{
"1" "Sandbox"
"2" "DarkRP"
}
}

And my groups.Txt
Code: [Select]
"superadmin"
{
"deny"
{
}
"allow"
{
"ulx addgroup"
"ulx removegroup"
}
"inherit_from"
{
"owner"
}
}
"admin"
{
"deny"
{
}
"allow"
{
"ulib_passtime"
"ulib_passtimeout"
"ulx spawnecho"
"ulx tsay"
"ulx csay"
"ulx gimp"
"ulx mute"
"ulx ungimp"
"ulx unmute"
"ulx gag"
"ulx ungag"
"ulx chattime"
"ulx welcomemessage"
"ulx slap"
"ulx whip"
"ulx slay"
"ulx sslay"
"ulx ignite"
"ulx playsound"
"ulx freeze"
"ulx unfreeze"
"ulx god"
"ulx ungod"
"ulx noclip"
"ulx hp"
"ulx cloak"
"ulx uncloak"
"ulx blind"
"ulx unblind"
"ulx jail"
"ulx unjail"
"ulx ghost"
"ulx unghost"
"ulx ragdoll"
"ulx unragdoll"
"ulx maul"
"ulx adminmenu"
"ulx clientmenu"
"ulx mapsmenu"
"ulx showmotd"
"ulx banmenu"
"ulx exec"
"ulx rslotsmode"
"ulx rslots"
"ulx rslotsvisible"
"ulx reservedslots"
"ulx bring"
"ulx goto"
"ulx send"
"ulx teleport"
"ulx tooldeny"
"ulx toolallow"
"ulx tooldenyuser"
"ulx toolallowuser"
"ulx tooldenyoverride"
"ulx map"
"ulx kick"
"ulx ban"
"ulx banid"
"ulx unban"
"ulx spectate"
"ulx mingekick"
"ulx physgunplayer"
"ulx vote"
"ulx votemap2"
"ulx votekick"
"ulx voteban"
"ulx veto"
"ulx unignite"
"ulx armor"
"ulx strip"
"umaps_extend"
}
"inherit_from"
{
"operator"
}
}
"user"
{
"deny"
{
}
"allow"
{
"ulx"
"ulx help"
"ulx psay"
"ulx asay"
"ulx thetime"
"ulx menu"
"ulx_valueupdate"
"ulx_cvar"
"ulx_getgamemodes"
"ulx motd"
"ulx_getbans"
"ulx usermanagementhelp"
"ulx who"
"ulx votemap"
"_umaps_chatprint"
"umaps_timeleft"
"umaps_nextmap"
}
"inherit_from"
{
}
}
"none"
{
"deny"
{
}
"allow"
{
"ulx logecho"
"ulx logfile"
"ulx logevents"
"ulx logchat"
"ulx logspawns"
"ulx logspawnsecho"
"ulx logdir"
"ulx addgimpsay"
"ulx addadvert"
"ulx addcsayadvert"
"ulx addforceddownload"
"ulx debuginfo"
"ulx voteecho"
"ulx votemap2successratio"
"ulx votemap2minvotes"
"ulx votekicksuccessratio"
"ulx votekickminvotes"
"ulx votebansuccessratio"
"ulx votebanminvotes"
"ulx votemapenabled"
"ulx votemapmintime"
"ulx votemapwaittime"
"ulx votemapsuccessratio"
"ulx votemapminvotes"
"ulx votemapvetotime"
"ulx votemapmapmode"
"ulx votemapaddmap"
}
"inherit_from"
{
}
}
"owner"
{
"deny"
{
}
"allow"
{
"overcomeimmunity"
"ulx hiddenecho"
"ulx rcon"
"ulx luarun"
"ulx cexec"
"ulx ent"
"ulx adduser"
"ulx removeuser"
"ulx userallow"
"ulx userdeny"
"ulx groupallow"
"ulx groupdeny"
}
"inherit_from"
{
"admin"
}
}
"n00b"
{
"deny"
{
}
"allow"
{
"ulx"
"ulx help"
"ulx psay"
"ulx asay"
"ulx thetime"
"ulx menu"
"ulx_valueupdate"
"ulx_cvar"
"ulx_getgamemodes"
"ulx motd"
"ulx_getbans"
"ulx usermanagementhelp"
"ulx who"
"ulx votemap"
"_umaps_chatprint"
"umaps_timeleft"
"umaps_nextmap"
}
"inherit_from"
{
}
}
"operator"
{
"deny"
{
}
"allow"
{
"ulx seeasay"
}
"inherit_from"
{
}
}

These are the files I have been messing with. Thanks for helping!
Re:Uteam - You're welcome
Re:admin - please read the ulx_readme.txt ... if/when that doesn't answer your question, please explore this forum a little better... We have a FAQ (FREQUENTLY ASKED QUESTIONS) forum that I'm sure will answer any new questions you have.

Sorry, about not searching, I thought if any of these kind of questons would have been talked about in this thread. But I did find a lot of usfull things searching. ;D

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: UTeam - Set teams based on usergroup.
« Reply #81 on: March 17, 2008, 08:31:13 AM »
You have Owner as the title for superadmin and Moderator as the title for owner?
Experiencing God's grace one day at a time.

Offline spbogie

  • Ulysses Team Member
  • Sr. Member
  • *****
  • Posts: 456
  • Karma: 41
Re: UTeam - Set teams based on usergroup.
« Reply #82 on: March 17, 2008, 09:16:14 AM »
You don't have a closing bracket ( } ) for the "teams" table.
I have not failed. I've just found 10,000 ways that won't work. - Thomas A. Edison
I reject your reality and substitute my own. - Adam Savage

Offline Typo001

  • Newbie
  • *
  • Posts: 14
  • Karma: 0
    • My (Personal) Site
Re: UTeam - Set teams based on usergroup.
« Reply #83 on: March 17, 2008, 02:10:56 PM »
You have Owner as the title for superadmin and Moderator as the title for owner?
Well at first it was the other way around, but when I added and started getting problems. I thought It was like, where at the bottom, has to be user. I thought superadmin had to be on top, so I switched them. Still did not fix it. It was the closing bracket that I forgot to put. Now I can switch it back to what it was before. Owner, Superadmin, Moderator, HIGHLY Respected (admin), Members, N00b (lowest rank, but only for people that are N00bs), and Guest.

You don't have a closing bracket ( } ) for the "teams" table.
Thanks you guys have been a lot of help! (I wish I could give you a rating like in Facepunch, Lua King/ Lua Helper/ Gold Star) ;)
Wow, it just stuns me how much human error there is in this kinda stuff. (Well I am sorta new to this, but still)

Oh yea just want to make sure I read this right, If I want a person on my server to be a 'operator', I would put: "ulx adduser <steam name> [operator]" Exactly like that, right?
« Last Edit: March 17, 2008, 03:17:48 PM by Typo001 »

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: UTeam - Set teams based on usergroup.
« Reply #84 on: March 17, 2008, 03:49:18 PM »
They have to be connected at the time, and remove the [], but yes.
Experiencing God's grace one day at a time.

Offline Typo001

  • Newbie
  • *
  • Posts: 14
  • Karma: 0
    • My (Personal) Site
Re: UTeam - Set teams based on usergroup.
« Reply #85 on: March 17, 2008, 04:00:31 PM »
Ok, it is just when you type it in the console it appears like that to me, so I thought that is how you did it.
They have to be connected at the time, and remove the [], but yes.

Offline spbogie

  • Ulysses Team Member
  • Sr. Member
  • *****
  • Posts: 456
  • Karma: 41
Re: UTeam - Set teams based on usergroup.
« Reply #86 on: March 17, 2008, 06:08:40 PM »
It is a fairly common standard that <>'s represent an argument that you must enter, and []'s represent that the argument is optional. The group argument of ulx adduser is not optional however. Perhapse you confused it with the immunity argument.
Code: [Select]
ulx adduser <user> <group> [<immunity>] - Add a user to specified group with optional immunity.
I have not failed. I've just found 10,000 ways that won't work. - Thomas A. Edison
I reject your reality and substitute my own. - Adam Savage

Offline Typo001

  • Newbie
  • *
  • Posts: 14
  • Karma: 0
    • My (Personal) Site
Re: UTeam - Set teams based on usergroup.
« Reply #87 on: March 17, 2008, 09:05:52 PM »
Oh, ok that makes sense, thanks!

Eddit:
That is why I had so much trouble with changing groups  :-\
« Last Edit: March 17, 2008, 10:39:07 PM by Typo001 »

Offline bobthe2lol

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
Re: UTeam - Set teams based on usergroup.
« Reply #88 on: April 25, 2008, 03:32:47 PM »
I can not get this to work. Everything about it doesnt work. Color, health, and speed dont work. IE, the entire addon doesnt work, can you fix it?

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: UTeam - Set teams based on usergroup.
« Reply #89 on: April 25, 2008, 06:13:41 PM »
I can not get this to work. <snip>
can you fix it?

This works.
Many of the servers from our server forum use it with no major issues.
Though I'm not sure speed and health work, I know color does.
We don't know why you are having troubles, so it makes it difficult to help you fix yours.

Did you follow all the instructions for install and configuration?
Which include but are not limited to installing ULib, configuring ULib for teams, configuring your UTeams.txt file to match the ULib team names, and placing UTeam.txt in the proper folder.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming