General > Developers Corner

Lua Help

(1/1)

Cyrk:
Hey there... I'm a new scripter so you have to remember that lol ;p, But on your admin mod.. I need to know how you looped through every player and put a button for each player in the derma panel. I also would like to know how you make HUD health bar and Ammo and shield bar, not text. Thanks! =D

jay209015:

--- Code: ---for k, v in pairs(player.GetAll()) do
combobox:AddItem(v:Nick())
end
--- End code ---

Where combobox is the vgui element that you created with:


--- Code: ---combobox = vgui.Create( "DComboBox" )
--- End code ---

That's for listing all players on a vgui.
For more info go HERE

Navigation

[0] Message Index

Go to full version