Jump to content

Sign in to follow this  
hogmason

chat txt and hints seen by correct team

Recommended Posts

hi im trying to get the below text to show only for the correct team so i.e west will see it but not east players and vice versa.

West only to see this

hint composeText [parsetext format["<t size='1' align='center' color='#00FF00'>Rally Point deploy available.%1</t>"]];

and

[sgt,nil,rGLOBALCHAT,"Rally Point deployed and marked on map."] call RE;

and

rallyDeployed = true; publicVariable "rallyDeployed";

i have the same setup for a resistance team to.

just wondering if any 1 can help please.

Edited by hogmason

Share this post


Link to post
Share on other sites

sideChat

directSay

vehicleChat

hroupChat

Hate to say it, but you could do with looking at the comref,. has some interesting commands and you know the whole searching rules. meh, like i say, i don't like to hassle.

---------- Post added at 10:27 AM ---------- Previous post was at 10:26 AM ----------

groupChat

Share this post


Link to post
Share on other sites

MPTW should do the trick - this is what we use - may be helpful for you

init.sqf - or loaded from init

//Side HINT	WEST	
// in init.sqf
"FOCK_SHintW" addPublicVariableEventHandler
 {
   private ["_SHint","_sayer","_SHintSide"];
  _sayer = _this select 0;
  _SHint = _this select 1;
//   _SHintSide = side _SHint; 
  if (side player == West) then
  {
   hint format["%1", _SHint];
   };
 };

the script that will hint...

//in script
_caller = _this select 1;
FOCK_SHintW = "HELLO Side Hint WEST"; publicVariable "FOCK_SHintW"; // data only received on other machines. Not on the machine where it is executed.
//if (side _caller == WEST) then (hint FOCK_SHintW);

//SIDE CHAT
// in init.sqf
"FOCK_SChat" addPublicVariableEventHandler
 {
   private ["_SChat","_sayer"];
  _sayer = _this select 0;
  _SChat = _this select 1;
   (_SChat select 0) SideChat format["%1",_SChat];
 };

//Script

_caller = _this select 1;
FOCK_SChat = [_caller,"HELLO Side Chat"]; publicVariable "FOCK_SChat"; 
hint (FOCK_SChat select 1); 

Share this post


Link to post
Share on other sites

@Mikie: That won't work if _caller is not valid to the client. Extra code is needed for that. I banged my head to that wall once.

Share this post


Link to post
Share on other sites

yeah sorry was in a hurry typing it - that is called from an add action. just to test it. Anyone using it from a script will have to add the correct code to work with the said team or side. DOH - my bad

Share this post


Link to post
Share on other sites

for future ref for any 1 ealse looking into doing this

i got a easy way to do it i used

[s1,nil,rgroupChat,"your text in here."] call RE;

//were
//s1 = group leaders name


that will display the msg to all players in that leaders group

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×