Ulysses Stuff > Ulysses Release Archives

UTeam - Set teams based on usergroup.

(1/52) > >>

spbogie:
Description:
UTeam allows you to set a player's team (and a few other things) based on their current usergroup.

Features:

* Set teams with custom color and name.
* Optionaly set health, armor, and player model for each team.
* Specify which gamemodes to load on.
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.
ChangeLog:

* Version 1.1
+Added support for setting variables on the player table (ie. SprintSpeed)
*Fixed errors when running on gamemodes not in list
*Gamemodes are based off name in scoreboare, but are no longer case-sensitive
UTeam_readme.txt

--- Code: ---UTeam
  By: spbogie [Ulysses Team]

Installation:
  place UTeam.txt in garrysmod/data
  place UTeam.lua in garrysmod/lua/autorun

ChangeLog:
 version 1.1
  +Added support for setting variables on the player table (ie. SprintSpeed)
  *Fixed errors when running on gamemodes not in list
  *Gamemodes are based off name in scoreboare, but are no longer case-sensitive

Config Format (UTeam.txt):
"Out"
{
"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)
}
}
}
"gamemodes" //Gamemodes to load on
{
"1" "Sandbox" //To add additional increase number each time
}
}

Valid player Models:
  alyx
  barney
  breen
  charple
  combine
  corpse
  eli
  female1
  female2
  female3
  gman
  kleiner
  male1
  male2
  male3
  monk
  mossman
  odessa
  police
  prison
  super
  zombie
--- End code ---

Download:

* Current Version: v1.1
* v1
See http://html-color-codes.com/rgb.html for good list of RGB color combinations

Megiddo:
Lua king'd :)

maaarten:
where do i put it?

in the lua/ulib/modules folder?

JamminR:

--- Quote from: maaarten on January 13, 2007, 05:22:07 PM ---where do i put it?

in the lua/ulib/modules folder?

--- End quote ---


--- Quote from: UTeam_readme.txt ---Installation:
  place UTeam.txt in garrysmod/data
  place UTeam.lua in garrysmod/lua/autorun

--- End quote ---

Though, modules would work too.
I think this script isn't reliant on ULib, so, it can just be put in autorun.
Personally, I like putting all of my U-scripts in modules. Only others I put there are ones that I have trouble with, or have had to modify for whatever reason or other (compatibility, gamemode checking, etc)

maaarten:
thanks ;D

Navigation

[0] Message Index

[#] Next page

Go to full version