Ulysses
Home
Help
Ulysses
»
General
»
Developers Corner
»
ULX scoreboard and text color help TTT server
« previous next »
Print
Pages:
1
2
[
3
]
Go Down
Author
Topic: ULX scoreboard and text color help TTT server (Read 49697 times)
0 Members and 1 Guest are viewing this topic.
Decicus
Hero Member
Posts: 552
Karma: 81
Re: ULX scoreboard and text color help TTT server
«
Reply #30 on:
September 01, 2013, 10:23:08 am »
Yes, remember that Lua is case sensitive, so any capital letters should be checked if they're supposed to be capital.
Logged
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.
DJ Mikey
Newbie
Posts: 17
Karma: 0
Re: ULX scoreboard and text color help TTT server
«
Reply #31 on:
September 01, 2013, 10:40:14 am »
well, with that last fix im all wrapped up with scoreboard groups and scoreboard colors. I appreciate all the help from everyone who posted here.
Logged
MiniCale
Newbie
Posts: 4
Karma: 0
Re: ULX scoreboard and text color help TTT server
«
Reply #32 on:
March 31, 2016, 03:27:55 pm »
When I have tried to get this to work for my server it doesnt work for the other groups only myself as superadmin,
Any help is appreciated
Code: Lua
function
GM
:
TTTScoreboardColorForPlayer
(
ply
)
if
not
IsValid
(
ply
)
then
return
namecolor
.
default
end
if
ply
:
SteamID
(
)
==
"STEAM_0:0:1963640"
then
return
namecolor
.
dev
elseif
ply
:
IsUserGroup
(
"superadmin"
)
then
return
namecolor
.
superadmin
elseif
ply
:
IsUserGroup
(
"Moderator"
)
then
return
namecolor
.
moderator
elseif
ply
:
IsUserGroup
(
"Admin"
)
then
return
namecolor
.
admin
end
return
namecolor
.
default
end
local
function
ColorForPlayer
(
ply
)
if
IsValid
(
ply
)
then
local
c
=
hook
.
Call
(
"TTTScoreboardColorForPlayer"
,
GAMEMODE
,
ply
)
-- verify that we got a proper color
if
c
and
type
(
c
)
==
"table"
and
c
.
r
and
c
.
b
and
c
.
g
and
c
.
a
then
return
c
else
ErrorNoHalt
(
"TTTScoreboardColorForPlayer hook returned something that isn't a color!
\n
"
)
end
end
return
namecolor
.
default
end
Logged
Print
Pages:
1
2
[
3
]
Go Up
« previous next »
Ulysses
»
General
»
Developers Corner
»
ULX scoreboard and text color help TTT server