Hey guys, I’ve been messing around with some Derma (ProgressBar specifically (ProgressBar made by Garry)) and I wanted to make the bar to count props on the server. I was not sure how to go about doing this, so I tried:
local bum = 0 – The amount of props
function SpawnedProp(ply, model, ent) – Adds 1 to bum everytime a prop spawned
bum = bum + 1
hook.Add(“PlayerSpawnedProp”, “playerSpawnedProp”, SpawnedProp)
local myProgressBar = vgui.Create( “DProgressBar” , DermaPanel)
myProgressBar:SetSize( 150, 40 )
myProgressBar:SetPos( 25, 25 )
myProgressBar:SetMin( 0 )
myProgressBar:SetValue(bum) – this is the “propamount” being displayed.
I do this and it just displays 0 all the time (I’m very new to Lua)
Help would be appreciated.