TriggerHappy
...
- Reaction score
- 341
He means;
JASS:
globals
private string array PlayerColor
private player array PLAYER
private constant string EndColor = "|r"
endglobals
function S2PCS takes string s, integer playerId returns string
return PlayerColor[GetHandleId( GetPlayerColor(PLAYER[playerId]))] + s + EndColor
endfunction
function GetPlayerColorString takes player p returns string
return PlayerColor[GetHandleId( GetPlayerColor(p))]
endfunction
function GetPlayerColorStringById takes integer playerId returns string
return PlayerColor[GetHandleId( GetPlayerColor(PLAYER[playerId]))]
endfunction
private function Init takes nothing returns nothing
local integer i = 0
loop
exitwhen i > 10
set PLAYER<i> = Player(i)
set i = i + 1
endloop
set PlayerColor[0] = "|c00ff0202"
set PlayerColor[1] = "|c000041ff"
set PlayerColor[2] = "|c001be5b8"
set PlayerColor[3] = "|c00530080"
set PlayerColor[4] = "|c00fffc00"
set PlayerColor[5] = "|c00fe890d"
set PlayerColor[6] = "|c001fbf00"
set PlayerColor[7] = "|c00e45aaf"
set PlayerColor[8] = "|c00949596"
set PlayerColor[9] = "|c007dbef1"
set PlayerColor[10] = "|c000f6145"
set PlayerColor[11] = "|c004d2903"
endfunction
endlibrary</i>