a3_exile_occupation/scripts/deleteMapMarkers.sqf

30 lines
628 B
Plaintext
Raw Normal View History

2016-04-02 19:06:53 +00:00
// Delete the map marker on a loot crate when a player gets in range
for "_i" from 1 to SC_numberofLootCrates do
{
_markerName = format ["loot_marker_%1", _i];
_pos = getMarkerPos _markerName;
if(!isNil "_pos") then
{
2016-04-27 00:05:03 +00:00
if([_pos, 15] call ExileClient_util_world_isAlivePlayerInRange) then
{
deleteMarker _markerName;
2016-04-02 19:06:53 +00:00
_logDetail = format ["[OCCUPATION:LootCrates]:: marker %1 removed at %2",_markerName,time];
[_logDetail] call SC_fnc_log;
};
};
2016-04-27 00:05:03 +00:00
};
if(SC_removeUserMapMarkers) then
{
{
if(_x find '_USER_DEFINED' > -1)then
{
deleteMarker _x;
}
} forEach allMapMarkers;
};