Jump to content
Sign in to follow this  
Pac Man

GetIn Eventhandler Dedicated Server

Recommended Posts

On a dedicated server, how would I broadcast the sideChat message to just the unit (player) that is getting kicked out of the vehicle? The function works as intended on a dedicated server except it doesn't broadcast the side chat message. The mission can be found here.

init.sqf

TAG_Fnc_VCheckW =
{
  _vehicle = _this select 0;
  _unit = _this select 2;

  if (side _unit != west) then {
  _unit sideChat "You can't use enemy vehicles";
  _unit action ["getOut", _vehicle];
 };

};

if (isServer) then {
_veh = createVehicle ["b_mrap_01_hmg_F", getMarkerPos "vehMrk", [], 0, "NONE"];
_veh addEventHandler ["getIn",{call TAG_Fnc_VCheckW}];
};

Edited by Pac Man

Share this post


Link to post
Share on other sites

Make a function to add the eventhandler and send the vehicle object to it using bis_fnc_MP

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  

×