mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
ffaa195fe5
* Fixed headers to work with silentspike python script * Fixed rest of the files * Fixed ace-team
31 lines
880 B
Plaintext
31 lines
880 B
Plaintext
/*
|
|
* Author: Glowbal
|
|
* Send a request to an unit and execute code based upon results.
|
|
*
|
|
* Arguments:
|
|
* 0: caller <OBJECT>
|
|
* 1: target <OBJECT>
|
|
* 2: requestID <STRING>
|
|
* 3: requestMessage Will be localized for other target object. <STRING>
|
|
* 4: callback Code called upon accept or decline. <CODE>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [bob, kevin, "ID", "Message", {callback}] call ace_common_fnc_sendRequest
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params ["_caller", "_target", "_requestID", "_requestMessage", "_callBack"];
|
|
|
|
if (isPlayer _target) then {
|
|
// Pass request on to target locality for player accept/decline.
|
|
[QGVAR(receiveRequest), [_caller, _target, _requestID, _requestMessage, _callBack], _target] call CBA_fnc_targetEvent;
|
|
} else {
|
|
// accept it, since it's an AI.
|
|
[_caller, _target, true] call compile _callBack;
|
|
};
|