Ulysses Stuff > Releases

sui_scoreboard with UTime and Steam Avatars

<< < (14/34) > >>

Megiddo:
You know derma entirely to well now Stickly :P

Stickly Man!:
It's a gift.... and a curse!

Buggzie:

--- Quote from: Stickly Man! on June 15, 2010, 08:24:03 AM ---Easy-- Open lua\sui_scoreboard\player_row.lua, then find the line:

--- Code: ---function PANEL:UpdatePlayerData()
--- End code ---
(around line #120)

Then in that function, find this line of code:

--- Code: ---self.lblTeam:SetText( team.GetName(self.Player:Team()) )
--- End code ---

...And then add this line of code right under that line:

--- Code: ---self.lblTeam:SizeToContents()
--- End code ---

I haven't tested it (I'm at work right now), but I'm 90% sure it should work ;D

--- End quote ---


--- Quote ---vgui.Create: Error when calling 'SuiScoreBoard':Init (sui_scoreboard\scoreboard.lua:76: attempt to index local 'button' (a nil value))
ERROR: GAMEMODE:'ScoreboardShow' Failed: autorun\sui_scoreboard.lua:44: attempt to index global 'SuiScoreBoard' (a nil value)
sui_scoreboard\scoreboard.lua:239: attempt to index field 'lblPing' (a nil value)
sui_scoreboard\scoreboard.lua:197: attempt to index field 'lblPing' (a nil value)
sui_scoreboard\scoreboard.lua:197: attempt to index field 'lblPing' (a nil value)
ERROR: GAMEMODE:'ScoreboardHide' Failed: autorun\sui_scoreboard.lua:56: attempt to index global 'SuiScoreBoard' (a nil value)
--- End quote ---

It broke it..

Stickly Man!:
Copy/paste the section of code you edited and post it here.

Edit: It SHOULD look something like this: (Depending on whether or not you have the UTime or the non-UTime version)


--- Code: ---function PANEL:UpdatePlayerData()

if ( !self.Player ) then return end
if ( !self.Player:IsValid() ) then return end

// self.lblName:SetText( team.GetName(self.Player:Team()) .." - ".. self.Player:Nick()  )
self.lblName:SetText( self.Player:Nick() )
self.lblTeam:SetText( team.GetName(self.Player:Team()) )
self.lblTeam:SizeToContents()
self.lblHours:SetText( math.floor((self.Player:GetUTime() + CurTime() - self.Player:GetUTimeStart())/60/60))
--- End code ---

Buggzie:
Thats exactly how i did it...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version