I have done something, work and test.
It's a MP dialog for a multi-squad script.
First create array of players and call inits (in init after server side test):
[ArrayGroupEastServer ] exec "Init\InitTaskServer.sqs"
Install server loops (select 0 is the group name, select 6 a predifened ID number) :
_ArrayOfparam = _this select 0
_i = 0
#Install
_SubArray = _ArrayOfparam select _i
[ _SubArray select 0, _SubArray select 6] exec "Task\ServerTask.sqs"
_i = _i +1
? _i < count _arrayOfParam : goto "Install"
the server side loop install for each player.
_Group = _This select 0
_IdGroup = _This select 1
;Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Assemblage de la variable d'attente
Call format ["PubWaitEvent%1%2 = false ; publicvariable {PubWaitEvent%1%2}",side _Group ,_IdGroup ]
#return
; Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Mise en attente du script d'un appel
@(Call format ["PubWaitEvent%1%2",side _Group ,_IdGroup ])
;                   Un appel a été demandé par client
;                  On remet la variable d'attente à faux car on boucle dans ce script
Call format ["PubWaitEvent%1%2 = false ; publicvariable {PubWaitEvent%1%2}",side _Group ,_IdGroup ]
;                  Convention du systéme : lorsque un client appelle il dit aussi ce qu'il veux faire
;                  Donc on récupère l'action demandée
_TypeAction = Call format ["PubTypeOfAction%1%2",side _Group ,_IdGroup ]
;                  On se branche sur l'action demandée
goto format ["%1",_TypeAction ]
;                  Un petit test au cas ça merde, car si on est ici c que ça pue :)
Goto "end"
;                  Déplacement d'un groupe
#1
_Xmove = Call format ["PubXmove%1%2",side _Group ,_IdGroup ]
_Ymove = Call format ["PubYmove%1%2",side _Group ,_IdGroup ]
_group move [ _Xmove,_Ymove]
Goto "End"
;Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Changer le mode de combat
#2
_Combat = Call format ["PubCombat%1%2",side _Group ,_IdGroup ]
Leader(_group ) setcombatMode (ArrayCombatGroup select _Combat)
Goto "End"
;Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Changer le mode de formation
#3
_Formation = Call format ["Pubformation%1%2",side _Group ,_IdGroup ]
Leader(_group ) setformation (ArrayFormationGroup select _Formation)
Goto "End"
;Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Changer la vitesse
#4
_Speed = Call format ["PubSpeed%1%2",side _Group ,_IdGroup ]
Leader(_group ) setspeedMode (ArraySpeedGroup select _Speed )
Goto "End"
;Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Changer l'engagement au combat
#5
_Behaviour = Call format ["PubBehaviour%1%2",side _Group ,_IdGroup ]
Leader(_group ) setbehaviour (ArrayBehaviourGroup select _Behaviour)
Goto "End"
;                  Changer la position debout ou allongé
#6
_Unitpos = Call format ["PubUnitpos%1%2",side _Group ,_IdGroup ]
{_x setUnitPos (ArrayUnitposGroup select _Unitpos) } foreach units _group
Goto "End"
;Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Changer la direction ou le groupe scrute
#7
_WatchDir = Call format ["PubWatchDir%1%2",side _Group ,_IdGroup ]
_Group setFormDir _WatchDir
Goto "End"
#End
;Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Se remet en attente
Goto "Return"
Local side caller script
;["Move",_Group,_PosMove] exec "eventmanager\ExecOnServer.sqs"Â Â Â Â Â Â Â Â Â 1
;["SetCombat",_whocall ,lbCurSel 1501] exec "eventmanager\ExecOnServer.sqs"Â Â Â Â Â Â 2
;["SetFormation",_whocall ,lbCurSel 1502] exec "eventmanager\ExecOnServer.sqs"Â Â Â Â Â Â 3
;["SetSpeed",_whocall ,lbCurSel 1503] exec "eventmanager\ExecOnServer.sqs"Â Â Â Â Â Â 4
;["SetBehaviour",_whocall ,lbCurSel 1504] exec "eventmanager\ExecOnServer.sqs"Â Â Â Â Â Â 5
;["SetUnitPos",_whocall ,lbCurSel 1505] exec "eventmanager\ExecOnServer.sqs"Â Â Â Â Â Â 6
;["SetFormDir",_whocall ,_TempDir ] exec "eventmanager\ExecOnServer.sqs"Â Â Â Â Â Â 7
_CurrentGroup = _this select 1
_Group = ArrayGroupParameters select _CurrentGroup select 0
_IDGroup = ArrayGroupParameters select _CurrentGroup select 6
_Where = _this select 0
Goto _Where
Goto "End"
#Move
_PosMove = _this select 2
Call format ["PubWaitEvent%1%2 = true ; publicvariable {PubWaitEvent%1%2}",side _Group ,_IdGroup ]
Call format ["PubTypeOfAction%1%2 = 1 ; publicvariable {PubTypeOfAction%1%2}",side _Group ,_IdGroup ]
Call format ["PubXmove%1%2 = %3 ; publicvariable {PubXmove%1%2}",side _Group ,_IdGroup,_PosMove select 0 ]
Call format ["PubYmove%1%2 = %3 ; publicvariable {PubYmove%1%2}",side _Group ,_IdGroup,_PosMove select 1 ]
Goto "End"
#SetCombat
_TypeCombat = _this select 2
Call format ["PubWaitEvent%1%2 = true ; publicvariable {PubWaitEvent%1%2}",side _Group ,_IdGroup ]
Call format ["PubTypeOfAction%1%2 = 2 ; publicvariable {PubTypeOfAction%1%2}",side _Group ,_IdGroup ]
Call format ["PubCombat%1%2 = %3 ; publicvariable {PubCombat%1%2}",side _Group ,_IdGroup,_TypeCombat ]
Goto "End"
#SetFormation
_TypeFormation = _this select 2
Call format ["PubWaitEvent%1%2 = true ; publicvariable {PubWaitEvent%1%2}",side _Group ,_IdGroup ]
Call format ["PubTypeOfAction%1%2 = 3 ; publicvariable {PubTypeOfAction%1%2}",side _Group ,_IdGroup ]
Call format ["Pubformation%1%2 = %3 ; publicvariable {Pubformation%1%2}",side _Group ,_IdGroup,_Typeformation ]
Goto "End"
#SetSpeed
_TypeSpeed = _this select 2
Call format ["PubWaitEvent%1%2 = true ; publicvariable {PubWaitEvent%1%2}",side _Group ,_IdGroup ]
Call format ["PubTypeOfAction%1%2 = 4 ; publicvariable {PubTypeOfAction%1%2}",side _Group ,_IdGroup ]
Call format ["PubSpeed%1%2 = %3 ; publicvariable {PubSpeed%1%2}",side _Group ,_IdGroup,_TypeSpeed ]
Goto "End"
#SetBehaviour
_TypeBehaviour = _this select 2
Call format ["PubWaitEvent%1%2 = true ; publicvariable {PubWaitEvent%1%2}",side _Group ,_IdGroup ]
Call format ["PubTypeOfAction%1%2 = 5 ; publicvariable {PubTypeOfAction%1%2}",side _Group ,_IdGroup ]
Call format ["PubBehaviour%1%2 = %3 ; publicvariable {PubBehaviour%1%2}",side _Group ,_IdGroup,_TypeBehaviour ]
Goto "End"
#SetUnitPos
_TypeUnitPos = _this select 2
Call format ["PubWaitEvent%1%2 = true ; publicvariable {PubWaitEvent%1%2}",side _Group ,_IdGroup ]
Call format ["PubTypeOfAction%1%2 = 6 ; publicvariable {PubTypeOfAction%1%2}",side _Group ,_IdGroup ]
Call format ["PubUnitpos%1%2 = %3 ; publicvariable {PubUnitpos%1%2}",side _Group ,_IdGroup,_TypeUnitpos ]
Goto "End"
#SetFormDir
_WatchDir = _this select 2
Call format ["PubWaitEvent%1%2 = true ; publicvariable {PubWaitEvent%1%2}",side _Group ,_IdGroup ]
Call format ["PubTypeOfAction%1%2 = 7 ; publicvariable {PubTypeOfAction%1%2}",side _Group ,_IdGroup ]
Call format ["PubWatchDir%1%2 = %3 ; publicvariable {PubWatchDir%1%2}",side _Group ,_IdGroup,_WatchDir ]
Goto "End"
#End
And how execute a command in the dialog (not entire script, only main loop and events) :
_Update = time +1
;**************************************************************************** Main events loop
         #MainLoop
         ~0.0001
         ? (_OldUnit != lbCurSel 1500)and ( lbCurSel 1500 !=-1) : Goto "1500"
         ? (_OldCombat != lbCurSel 1501)and ( lbCurSel 1501 !=-1) : Goto "1501"
         ? ( _OldFormation != lbCurSel 1502)and ( lbCurSel 1502 !=-1) : Goto "1502"
         ? ( _OldSpeed != lbCurSel 1503)and ( lbCurSel 1503 !=-1) : Goto "1503"
         ? ( _OldBehaviour != lbCurSel 1504)and ( lbCurSel 1504 !=-1) : Goto "1504"
         ? ( _OldUnitPos != lbCurSel 1505)and ( lbCurSel 1505 !=-1) : Goto "1505"
         ? ( _OldAction != lbCurSel 1508)and ( lbCurSel 1508 !=-1) : Goto "1508"
         ? ( _OldInstantAction != lbCurSel 1510)and ( lbCurSel 1510 !=-1) : Goto "1510"
        Â
         ? Notaction : goto "Notaction"; Notaction = false
         ? ConfirmAction : goto "ConfirmAction";ConfirmAction = false
         ? _update > time : goto "skipUpdateInfos"
         _Update = time +1
         goto "UpdateValuesOfgroup"
         #skipUpdateInfos
        Â
? !(cancel) and !(validation)and (ctrlVisible 1500) : goto "Mainloop"
;µµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµµ End of Main event loop
? cancel : goto "cancel"
? !(validation) : goto "cancel"
? validation : goto "store"
#Store
cancel = false
validation = false
closedialog 0
goto "endScript"
#Cancel
cancel = false
validation = false
closedialog 0
#endScript
exit
;******************************************************* Management of events
#1500
? _OneOrderInProgress : lbSetCurSel [1500, _OldUnit ] ; Goto "MainLoop"
_OldUnit =lbCurSel 1500
_WhoCall = lbCurSel 1500; _Return = "Return1500" ; _OldUnit == lbCurSel 1500; [ lbCurSel 1500] exec "gfolder\Group.sqs";goto "UpdateValuesOfgroup"
#Return1500
Goto "MainLoop"
#1501
_OldCombat =lbCurSel 1501
_CurrentCombat = lbtext [1501,lbCurSel 1501]
["SetCombat",_whocall ,lbCurSel 1501] exec "eventmanager\ExecOnServer.sqs"
#Return1501
Goto "MainLoop"
#1502
_Oldformation =lbCurSel 1502
_Currentformation = lbtext [1502,lbCurSel 1502]
["SetFormation",_whocall ,lbCurSel 1502] exec "eventmanager\ExecOnServer.sqs"
#Return1502
Goto "MainLoop"
#1503
_Oldspeed =lbCurSel 1503
_Currentspeed = lbtext [1503,lbCurSel 1503]
["SetSpeed",_whocall ,lbCurSel 1503] exec "eventmanager\ExecOnServer.sqs"
With this method you create all server side commands.