for id, player in ipairs ( getElementsByType ( "player" ) ) do
local row = guiGridListAddRow ( aTab1.PlayerList )
guiGridListSetItemPlayerName ( aTab1.PlayerList, row, 1, getPlayerName ( player ), false, false )
guiGridListSetItemData ( aTab1.PlayerList, row, 1, player )
end
local player = guiGridListGetItemData ( aTab1.PlayerList, guiGridListGetSelectedItem ( aTab1.PlayerList ), 1 )
if player then
if isElement ( player ) then
local data = getElementData ( player, "data") or aPlayers[player]["accountname"]
guiSetText ( aTab1.Account, "acc: "..tostring(data) )
else
guiSetText ( aTab1.Account, "acc: not found." )
end
end