ACE3/addons/sitting/functions/fnc_canSit.sqf

23 lines
502 B
Plaintext
Raw Normal View History

2015-06-07 20:00:43 +00:00
/*
* Author: Jonpas
* Check if the player can sit down.
*
* Arguments:
* 0: Seat <OBJECT>
* 1: Player <OBJECT>
*
* Return Value:
* Can Sit Down <BOOL>
*
* Example:
* [seat, player] call ace_sitting_fnc_canSit;
*
* Public: No
*/
#include "script_component.hpp"
PARAMS_2(_seat,_player);
2015-06-08 21:25:15 +00:00
// Sitting enabled, is seat object and not occupied
(GVAR(enable) && {getNumber (configFile >> "CfgVehicles" >> typeOf _seat >> QGVAR(canSit)) == 1} && {isNil{_seat getVariable QGVAR(seatOccupied)}})