Derma Player Selection

Hi, i know how to make a list of players in a box using derma with the command:


I also know how to populate that list with players, what i would like to know however is what player i have selected. I can use:

…TestingComboBox:GetSelectedItems()[1]:GetValue()… (<- got from lua wiki)

But this only shows the NAME i have selected, but is there any way to actualy get their steamid so i can run commands on them? (i have some buttons which execute sql functions on their ‘server profile’ but i need their steamid)

Maybe you could create a table of steamids when populating the list and make it so the first item’s value corresponds with index one of the table. Then loop trough all items and if item:GetSelected() returns true, use the steamID with the corresponding index. :smile:

I haven’t tested it but it should do the trick.

Edit: Actually no need to make a steamid list… player.GetByID(itemindex):SteamID()

What would my ‘itemindex’ be

player:SteamID is not available clientside :3

Ill be running it on a server so (im just guessing here) it might be possible to network it and send it to a server side lua file? (sorry if this sounds stupid im new to all this stuff so i’m not sure how it all works)