1)You need a client side script to run. Call it rspeak.sqs
_unit = _this select 0
_msgnumber = _this select 1
_msg = ["Hardy harhar","You suck","No thanks, I don't like chicken"]
_unit groupChat _msg select _msgnumber
exit
2)Put in your in your init.sqs a variable for the speaker, and a variable for the message number.
rMsgSpeaker = ObjNull
rMsgNumber = -1
In your script add the lines:
rMsgSpeaker = unit you want to send message
publicVariable "rMsgSpeaker"
rMsgNumber = index of message in array
publicVariable "rMsgNumber"
Now put a repeatedly trigger on your map with this as the condition:
rMsgNumber > -1
and this in its onActivation:
[rMsgSpeaker,rMsgNumber] exec "rspeak.sqs"; rMsgNumber = -1
OFP can not send strings and arrays between machines in MP, so if you want to generate a dynamic message you must add the code to the rspeak.sqs to construct the message on each client.
e.g. rspeak.sqs
_unit = _this select 0
_msgnumber = _this select 1
_msg = ["We have lost target", format ["We are %1 metres from target.", heli distance car], format["Target destroyed at position %1, at time %2", position heli, daytime ]]
_unit groupChat _msg select _msgnumber
exit
Your other option is to use Chain of Commands' Network Services 2.0 i.e. CoC_NS2