-- Forward displayplayer (splitscreen) offset to player_t. -- Written by James R. This file is placed in the public domain. local newplayers = false local hudplayers = {} local firstplayer = #players addHook ("ThinkFrame", function () if (newplayers) then for p in pairs (hudplayers) do p.splitscreen = #p - firstplayer end hudplayers = {} newplayers = false firstplayer = #players end end) hud.add(function (v, p) if (p.splitscreen == nil) then newplayers = true hudplayers[p] = 1 if (#p < firstplayer) then firstplayer = #p end end end) COM_AddCommand("whos", function (consoleplayer) for p in players.iterate do CONS_Printf(consoleplayer, string.format("%d %s", p.splitscreen, p.name)) end end)