fnc_deployCCPServer.sqf 644 B

12345678910111213141516171819202122232425
  1. /*
  2. * Author: M3ales
  3. *
  4. * Replaces the given target object with the CCP object, and adds an ace interact on JIP
  5. *
  6. * Arguments:
  7. * Target Object
  8. * Return Value:
  9. * None
  10. *
  11. * Example:
  12. * [cursorTarget] call rd501_fnc_deployCCPServer
  13. *
  14. * Public: No
  15. */
  16. params["_target"];
  17. _position = position _target;
  18. deleteVehicle _target;
  19. _spawner = createVehicle[rd501_medical_ccp_building, _position, [], 0, "CAN_COLLIDE"];
  20. systemChat format["Deployed CCP"];
  21. _jipId = ["rd501_medical_ccp_deployCCPLocal", [_spawner]] call CBA_fnc_globalEventJIP; // raise on all clients (we should be on server)
  22. [_jipId, _spawner] call CBA_fnc_removeGlobalEventJIP;