This is from a small client side script I made a while back that fetches everyone in the server to your location
function fetchall(%x)
{
if(!%x)
return;
for(%a=0; %a<npl_list.rowcount(); %a++)
commandtoserver('fetch', getfield(npl_list.getrowtext(%a), 1));
}
$remapdivision[$remapcount] = "Random Stuff";
$remapname[$remapcount] = "Fetch All Players";
$remapcmd[$remapcount] = "fetchall";
$remapcount++;
Basically what you want to do is look at the gui object called npl_list and search through its fields
For example, doing npl_list.getrowtext(%a) will return all the text on the line %a of that gui, with each element divided by tabs.
You can then use getfield(%text, %index) to divide that line into the tabbed elements.
I believe index 0 is admin state, 1 is name, 2 is score, 3 is the BL_ID (if enabled), and 4 is the trust level.
To match a name with a BL_ID, you will need to loop through this GUI
Compensating for whether or not showing BL_IDs in the player list is enabled is something you will need to work out yourself.