Heaney 11 Posted July 28, 2012 Hi. Right now I am using [-1, {player globalChat _this}, _themessage] call CBA_fnc_globalExecute; To give a global chat message. Problem is of course that this is on all clients. Any way I can have it come over global chat, but only to one client? Share this post Link to post Share on other sites
riouken 15 Posted July 28, 2012 Raise a cba remote local event: https://dev-heaven.net/docs/cba/files/events/fnc_remoteLocalEvent-sqf.html Share this post Link to post Share on other sites
Muzzleflash 111 Posted July 28, 2012 What Riouken said, except you should use CBA_fnc_whereLocalEvent instead. CBA_fnc_remoteLocalEvent was not meant to be a public function. Rather it is used to implement the "local" based event system and not meant to be used outside of CBA. Share this post Link to post Share on other sites
riouken 15 Posted July 28, 2012 Yep, thanks muzzleflash, I always get them mixed up , by which one is depreciated. Share this post Link to post Share on other sites
Heaney 11 Posted August 2, 2012 (edited) How would I use this to achieve what I was asking about? I don't see how to use code with this. Edited August 2, 2012 by Heaney Share this post Link to post Share on other sites
Muzzleflash 111 Posted August 3, 2012 First you add an "event handler" on all machines, could be a place like init.sqf. The first parameter has to be the object that must be local. Eg. if you want a message to show up at player A then player A would be the first parameter. The message is the second. ["local_msg", { (_this select 0) globalChat (_this select 1); }] call CBA_fnc_addLocalEventHandler; This is how you would send the event //Assume that the player object who you want to see this message is in _thePlayer //The message is "Hello world!" ["local_msg", [_thePlayer, "Hello world!"]] call CBA_fnc_whereLocalEvent; Basically that is how event handlers work in CBA. You register them on machines and then send the events. In this case the first argument determines where it is run. There are also CBA event handlers that don't care created by CBA_fnc_addEventHandler and activated by CBA_fnc_globalEvent Share this post Link to post Share on other sites
Heaney 11 Posted August 3, 2012 Wow that's a great explanation, I get it now. Thanks! Share this post Link to post Share on other sites
Heaney 11 Posted August 3, 2012 (edited) EDIT: Ignore. Edited August 3, 2012 by Heaney Share this post Link to post Share on other sites