Karos Graveyard ::
Function Reference :: Scope Reference :: Variable Reference
Returns the team number of a player (may be a different number than what is in the game-setup screen).

-------------------------------------------------------------------------------
-- returns the team number of a player (may be different than what is in the game-setup screen)
-- function created by Mikail
--
function Player_Team(iPlayer)
    local TeamsTable = {}
    for playerIndex = 0, PlayerCount do
        local IsAllied = 0
        for i = 1, getn(TeamsTable) do
            if (AreAllied(playerIndex, TeamsTable[i]) == 1) then
                IsAllied = 1
                break
            end
        end
        if (IsAllied == 0) then
            tinsert(TeamsTable, playerIndex)
        end
    end
    for i = 1, getn(TeamsTable) do
        if (AreAllied(iPlayer, TeamsTable[i]) == 1) then
            return i
        end
    end
end
:: ::
Hide Download Bar
Ctrl + Shift + Z = Show/Hide Download Bar
Downloads
Download Manager (S3)
Clear
Left Click: Clear All Finished
Right Click: Undo last clear
100%
Download History
Download list is empty
UserFunctionPlayer_NumberOfShips.html
100%
00:00
506 KB
2.43 MB/s
UserFunctionPlayer_NumberOfShips.html
Source:
From:
To:
G:\HWRMResources\tutorials\hw2wiki.net\Functions_StandAlone\UserFunctionPlayer_NumberOfShips.html
Status:
506 KB / 506 KB ( 2.43 MB/s )
File Size:
506 KB
Virus scan:
Time Start:
2019.08.20 - 19:18:45
Time to Complete:
<00:01
Time Left:
00:00
Percent Done:
100%
Average Speed:
2.43 MB/s
mouse double click: download pause/resume
mouse middle click: download cancel
mouse double click: open file
mouse double click + Ctrl: open dir
mouse middle click: delete from list
mouse middle click + Ctrl: delete from system
press mouse button + Ctrl: drag & drop