mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
742626ff1a
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
37 lines
861 B
Plaintext
37 lines
861 B
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* Author: chris579
|
|
* Checks whether the player can move markers.
|
|
*
|
|
* Arguments:
|
|
* 0: Marker Name <STRING>
|
|
*
|
|
* Return Value:
|
|
* Whether the player can move markers <BOOL>
|
|
*
|
|
* Example:
|
|
* ["X"] call ace_markers_fnc_canMove
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params [["_marker",""]];
|
|
|
|
if ((markerShape _marker) == "POLYLINE") exitWith { false };
|
|
|
|
switch (GVAR(moveRestriction)) do {
|
|
case MOVE_RESTRICTION_NOBODY: {false};
|
|
case MOVE_RESTRICTION_ALL: {true};
|
|
case MOVE_RESTRICTION_ADMINS: {IS_ADMIN};
|
|
case MOVE_RESTRICTION_GROUP_LEADERS: {
|
|
leader ACE_player == ACE_player
|
|
};
|
|
case MOVE_RESTRICTION_GROUP_LEADERS_ADMINS: {
|
|
(leader ACE_player == ACE_player) || IS_ADMIN
|
|
};
|
|
case MOVE_RESTRICTION_OWNER: {
|
|
_marker in GVAR(userPlacedMarkers)
|
|
};
|
|
default {true};
|
|
}; // return
|