function MeleeVictoryDialogBJ takes player whichPlayer, boolean leftGame returns nothing
local trigger t = CreateTrigger()
local dialog d = DialogCreate()
local string formatString
// Display "player was victorious" or "player has left the game" message
if (leftGame) then
set formatString = GetLocalizedString( "PLAYER_LEFT_GAME" )
else
set formatString = GetLocalizedString( "PLAYER_VICTORIOUS" )
endif
call DisplayTimedTextFromPlayer(whichPlayer, 0, 0, 60, formatString)
call DialogSetMessage( d, GetLocalizedString( "GAMEOVER_VICTORY_MSG" ) )
call DialogAddButton( d, GetLocalizedString( "GAMEOVER_CONTINUE_GAME" ), GetLocalizedHotkey("GAMEOVER_CONTINUE_GAME") )
set t = CreateTrigger()
call TriggerRegisterDialogButtonEvent( t, DialogAddQuitButton( d, true, GetLocalizedString( "GAMEOVER_QUIT_GAME" ), GetLocalizedHotkey("GAMEOVER_QUIT_GAME") ) )
call DialogDisplay( whichPlayer, d, true )
call StartSoundForPlayerBJ( whichPlayer, bj_victoryDialogSound )
endfunction