A function to get all the Players that have ever been on the server? Gmod Lua

I couldn’t find anything on the Gmod Wiki, but im pretty sure there has to be a function or a way to get a table of all the users that have ever been to a server.
player.GetAll only gives you the online users, but I have to get even the ones not on the server right now.

I hope someone can help me with this :slight_smile:

There is nothing in base gmod that would does this, however if you have Ulib/Ulx that does keep track of all players that have ever been on. LibK also does this however it is less common. Do you have either?

Also if you have an addon that uses pdata, then you can get a list of Unique IDs (might be useless as it can’t be converted to Steam ID) from the playerpdata table in sv.db

Use PlayerConnected hook, add it Nick/steamid inside a table, when they initial spawn, remove that player entry from the table youve created before, that way you have a connecting player list