ACE3/addons/overheating/functions/fnc_checkSpareBarrelsTemperatures.sqf
esteldunedain e6a2ca7102 Fix typos
2016-03-01 19:25:45 -03:00

39 lines
914 B
Plaintext

/*
* Author: esteldunedain
* Make the player check the temperature of his spare barrels
*
* Arguments:
* 0: Player <OBJECT>
*
* Return Value:
* None
*
*
* Public: No
*/
#include "script_component.hpp"
params ["_player"];
// Check canInteractWith:
if (!([_player, objNull, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith))) exitWith {};
// Make the unit go kneeling
[_player] call EFUNC(common,goKneeling);
// Spawn a progress bar
[
5.0,
[_player],
{
params ["_args", "_elapsedTime", "_totalTime", "_errorCode"];
_args params ["_player"];
// Time has enlapsed, ask the server to send the hint
['spareBarrelsSendTemperatureHint', [_player, _player]] call EFUNC(common,serverEvent);
},
{},
(localize LSTRING(CheckingSpareBarrelsTemperatures)),
{true},
["isNotInside", "isNotSitting"]
] call EFUNC(common,progressBar);