I’m honestly not sure how to do this since everything that lists players in a table returns it as the player entities. I’d like to get it to return the playermodel string so I can list all the players in each team with spawn icons.
Secondly, is it possible to get the names of the players to show up in those little yellow speech bubbles when you move your cursor over them?
I made an attempt using “player_manager.AllValidModels()”, but obviously that just gave me a list of all the avaliable player models.
[lua]group1menu = vgui.Create(“DModelSelect”, groupslist )
group1menu:SetSize( 300, 300 )
group1menu:SetSpacing( 5 )
group1menu:EnableHorizontal( true )
group1menu:EnableVerticalScrollbar( false )
group1menu:SetPadding( 4 )
for k,v in pairs(player_manager.AllValidModels( )) do
local group1list = vgui.Create( “SpawnIcon”, group1menu )
group1list:SetModel( v )
group1menu:AddItem( group1list )
If you can help, Thanks!