function CustomVictoryDialogBJ takes player whichPlayer returns nothing
local trigger t = CreateTrigger()
local dialog d = DialogCreate()
call DialogSetMessage( d, GetLocalizedString( "GAMEOVER_VICTORY_MSG" ) )
set t = CreateTrigger()
call TriggerRegisterDialogButtonEvent( t, DialogAddButton( d, GetLocalizedString( "GAMEOVER_CONTINUE" ), GetLocalizedHotkey("GAMEOVER_CONTINUE") ) )
call TriggerAddAction( t, function CustomVictoryOkBJ )
set t = CreateTrigger()
call TriggerRegisterDialogButtonEvent( t, DialogAddButton( d, GetLocalizedString( "GAMEOVER_QUIT_MISSION" ), GetLocalizedHotkey("GAMEOVER_QUIT_MISSION") ) )
call TriggerAddAction( t, function CustomVictoryQuitBJ )
if (GetLocalPlayer() == whichPlayer) then
call EnableUserControl( true )
if bj_isSinglePlayer then
call PauseGame( true )
endif
call EnableUserUI(false)
endif
call DialogDisplay( whichPlayer, d, true )
call VolumeGroupSetVolumeForPlayerBJ( whichPlayer, SOUND_VOLUMEGROUP_UI, 1.0 )
call StartSoundForPlayerBJ( whichPlayer, bj_victoryDialogSound )
endfunction