Player List

Hi, I have noticed some admin mods with a white list and all the players name in it, how do I do that?

[lua]player.GetAll()[/lua] returns a table of all the connected players.

Im still confused can anyone give me some more advice on this.

Like this white box with the player names in.

Salads gave you a link to that derma control.

Yes I can see that but I dont know how

Do you know how to create menus using derma?

If that may be too much for you, I suggest starting here at one of the two:

Learn how to use Derma then go back to the link I sent above.

IM half way through making my GUI and you guys aint helping, its just that I dont know howto do looks like I will have to work it out instead of hoping someone helps me.

Salads gave you more than a satisfactory level of help. If you don’t want to appreciate it, just leave.

Now I have it all made but I cant get the players names to show up


for _,v in ipairs(player.GetAll()) do combo:AddItem(v:Name()) end

If you come back with the error “combo does not exist” or the likes I will kill you in your sleep.

Using a DComboBox (tutorial listed on that page) do some thing like this where the gui is created:

for k, v in pairs( player.GetAll() ) do --Loops through all players, ‘v’ is each player object.
myDComboBoxControl:AddItem( v:Name() ) – Adds an option to myDComboBoxControl of the players name. Remeber ‘v’ was our object, and :Name() returns their name.


OMG you guys are beast thats so much :wink: