mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
28 lines
510 B
Plaintext
28 lines
510 B
Plaintext
/*
|
|
* 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);
|
|
|
|
// If seat object and not occupied
|
|
if (getNumber (configFile >> "CfgVehicles" >> typeOf _seat >> QGVAR(canSit)) == 1 &&
|
|
{isNil{_seat getVariable QGVAR(seatOccupied)}}
|
|
) exitWith {true};
|
|
|
|
// Default
|
|
false
|