2018-09-17 19:19:29 +00:00
|
|
|
#include "script_component.hpp"
|
2017-09-07 17:26:32 +00:00
|
|
|
/*
|
|
|
|
* Author: chris579
|
|
|
|
* Checks whether the player can move markers.
|
|
|
|
*
|
|
|
|
* Arguments:
|
2019-01-03 19:31:21 +00:00
|
|
|
* 0: Marker Name <STRING>
|
2017-09-07 17:26:32 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Whether the player can move markers <BOOL>
|
|
|
|
*
|
|
|
|
* Example:
|
2019-01-03 19:31:21 +00:00
|
|
|
* ["X"] call ace_markers_fnc_canMove
|
2017-09-07 17:26:32 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
2019-01-03 19:31:21 +00:00
|
|
|
params [["_marker",""]];
|
|
|
|
|
2017-09-07 17:26:32 +00:00
|
|
|
switch (GVAR(moveRestriction)) do {
|
2018-01-05 17:55:00 +00:00
|
|
|
case MOVE_RESTRICTION_NOBODY: {false};
|
|
|
|
case MOVE_RESTRICTION_ALL: {true};
|
|
|
|
case MOVE_RESTRICTION_ADMINS: {IS_ADMIN};
|
2017-09-07 17:26:32 +00:00
|
|
|
case MOVE_RESTRICTION_GROUP_LEADERS: {
|
2018-01-05 17:55:00 +00:00
|
|
|
leader ACE_player == ACE_player
|
2017-09-07 17:26:32 +00:00
|
|
|
};
|
|
|
|
case MOVE_RESTRICTION_GROUP_LEADERS_ADMINS: {
|
2018-01-05 17:55:00 +00:00
|
|
|
(leader ACE_player == ACE_player) || IS_ADMIN
|
2017-09-07 17:26:32 +00:00
|
|
|
};
|
2019-01-03 19:31:21 +00:00
|
|
|
case MOVE_RESTRICTION_OWNER: {
|
|
|
|
_marker in GVAR(userPlacedMarkers)
|
|
|
|
};
|
2018-01-05 17:55:00 +00:00
|
|
|
default {true};
|
|
|
|
}; // return
|