Garry's Mod

Garry's Mod

Garry's Mod Stranded
此主题已被锁定
Polar 2013 年 8 月 30 日 下午 7:11
Tab Tags By Names
Okay, so I have taken time to tinker with the code a little bit, particularly I have been trying to add more tags in the tab menu by peoples names. Now I use ulx to group my users on the server, is there anyway to actually incorporate ulx with the scoreboard code with giving people tags?

Original code
if ( pl:IsAdmin() ) then PlayerInfo.Name = "[ADMIN] " .. PlayerInfo.Name end if ( pl:IsDeveloper() ) then PlayerInfo.Name = "[DEVELOPER] " .. pl:Nick() end

What I modified:
if function(ply) IsUserGroup("superadmin") end then PlayerInfo.Name = "[OWNER] " .. PlayerInfo.Name end

My modified code gives everybody on the server the tag without breaking the scoreboard or giving lua errors but when you have multiple tags, it gives everyone all the tags.

Example:
[OWNER][ADMIN][MOD] DatPolarBear

Anyone have any idea how to fix this?

EDIT:
I fixed the code and so far it works without any lua errors or any breaking of the gamemode.

This works with ulx groups. Just change the group name and what you want the tag to be.
if ( pl:IsUserGroup("superadmin") ) then PlayerInfo.Name = "[OWNER] " .. PlayerInfo.Name end
最后由 Polar 编辑于; 2013 年 8 月 31 日 下午 2:16
< >
正在显示第 1 - 1 条,共 1 条留言
Rubat  [开发者] 2013 年 9 月 2 日 上午 10:05 
To override the tag, so it will be the last one, use
if ( pl:IsDeveloper() ) then PlayerInfo.Name = "[DEVELOPER] " .. pl:Nick() end
< >
正在显示第 1 - 1 条,共 1 条留言
每页显示数: 1530 50