- Joined
- Jun 7, 2008
- Messages
- 440
JASS:
function SetPlayerPrefix takes unit hero returns nothing
local string txt
local player player_owner = GetOwningPlayer(hero)
local integer player_owner_id = GetPlayerId(player_owner)
set txt = udg_PlayerName[player_owner_id] + " (" + GetUnitName(hero) + ")"
call SetPlayerName(player_owner, txt)
set txt = null
set player_owner = null
endfunction