- Joined
- Jun 21, 2019
- Messages
- 4
Code:
function zoomObserverDialog()
BJDebugMsg('zoomObserverDialog')
local d = nil
local b = nil
local t = CreateTrigger()
bzoom = {}
for i = 0, bj_MAX_PLAYERS do
if not IsPlayerObserver(Player(i)) then
BJDebugMsg('Observer detected')
d = DialogCreate()
DialogSetMessage(d, 'Select zoom')
b=DialogAddButton(d, "Default", 0)
TriggerRegisterDialogButtonEvent(t, b)
bzoom[b] = 1650
b=DialogAddButton(d, "Medium", 1)
TriggerRegisterDialogButtonEvent(t, b)
bzoom[b] = 2075
b=DialogAddButton(d, "High", 2)
TriggerRegisterDialogButtonEvent(t, b)
bzoom[b] = 2500
b=DialogAddButton(d, "Very High", 3)
TriggerRegisterDialogButtonEvent(t, b)
bzoom[b] = 3000
TriggerRegisterDialogEvent(t, d)
DialogDisplay ( Player(i), d, true)
BJDebugMsg('Dialogshouldbeseen for '..GetPlayerName(Player(i)))
end
end
TriggerAddAction(t, ObsButtonAction)
b = nil
d = nil
t=nil
BJDebugMsg('zoomObserverDialog Complete')
end
It never writes "OBA". Where did I mess it?
It shows dialog, it hides dialog on clicking button but never executes ObsButtonAction script
Last edited: