How do I Check Group?

Hey Fp,
uh.

So I’m working on a scoreboard, and I want it to check the user group, and than if say the usergroup is Superadmin, than it’ll display a text defined as superadmin like…

local superadmin = “Staff”
local vip = “VIP”

All I need is a bit of help, and what command do I use to check group?
I know LocalPlayer():IsUserGroup, but not checkgroup.

The scoreboard doesn’t work with using
[lua]if LocalPlayer():IsUserGroup(“vip”) then
self.lblName(self.Player:SteamName()…" VIP")
else
self.lblName(self.Player:SteamName()…" Member")
end
[/lua]

Anyways, if you could help, taaaanks ;d

p.s. using Ulx.

Use LocalPlayer():IsUserGroup(“superadmin”) or so on…

Using my scoreboard method, it doesn’t work.
I’m not sure why :\

edit:
When I set to VIP, everyone on the scoreboard turns VIP -.-"
Edit again…:
Now using players.getAll()

I cant see your full code but it would appear that your checking localplayer for everyone.

Yeah, I got to that problem and changed it to…
if player.GetAll():IsUserGroup(“vip”) then



function PANEL:UpdatePlayerData()
	if not ValidEntity(self.Player) then return end
	local Team = LocalPlayer():Team()
	
	self.lblName:SetText(self.Player:SteamName())
	
	self.lblName:SizeToContents()
	
	self.lblJob:SetText("---" or "")
	self.lblJob:SizeToContents()
	self.lblPing:SetText(self.Player:Ping())
	
	local vip = "VIP"
	local member = "Member"
	local playerz = player.GetAll()[1]
		if playerz:IsUserGroup("vip") then
	self.lblWarranted:SetText(vip)
		elseif playerz:IsUserGroup("user") then
	self.lblWarranted:SetText(member)
	end
	
	self.lblJob:SizeToContents()
/*	if self.Player.CyderRPVars.wanted then
		self.lblWarranted:SetVisible(true)
	elseif not self.Player.CyderRPVars.wanted then
		self.lblWarranted:SetVisible(false)
	end*/

	-- Work out what icon to draw
	self.texRating = surface.GetTextureID("gui/silkicons/emoticon_smile")

	self.texRating = texRatings[ 'none' ]
	local count = 0

	count = self:CheckRating('smile', count)
	count = self:CheckRating('love', count)
	count = self:CheckRating('artistic', count)
	count = self:CheckRating('star', count)
	count = self:CheckRating('builder', count)
	count = self:CheckRating('friendly', count)
end


Again your just checking the first player, try self.Player from the looks of your code that should work.

Alright, thanks.
Btw, how do you know what ‘self’ is?

Hey Mayor, thanks a ton!
It worked, self.Player:IsUserGroup() !

Big ups to you, I can’t thank you enough! (Been on this for like hours -.-")

In this case self would be whatever panel your using this function on.