Lock Doors - Theseus-Aegis/MissionTemplate GitHub Wiki
This page will explain the usage of the Lock Doors function.
/*
* Author: Mike
*
* Call on the server with isGlobal flag or locally without it.
*
* Arguments:
* 0: Building <OBJECT>
* 1: Door Index <ARRAY> (default: [])
* 2: Lock State <NUMBER> (default: 1)
* 2: Global <BOOL> (default: true)
*
* Return Value:
* None
*
* Examples:
* [My_Building, [1, 2]] call MFUNC(lockDoors);
* [My_Building, [1, 2, 3, 4], 0, false] call MFUNC(lockDoors);
*/
You provide a building and an array of doors you want to lock. (Numbers can be found through building attributes), along with locking (1) or unlocking (0) and whether you want it to be done for all players or certain ones.
Can be called via initServer
with isGlobal
flag or locally for certain players if desired.
Example:
[My_Building, [1, 2, 4, 5, 8, 9], 1, true] call MFUNC(lockDoors);