Today I’m going to show you a quick tip. I’m sure some of you asked yourself how to mark all ATMs on the map which are placed by default on the map.

Here you go:

/*
File: fn_atmMarkers.sqf
Author: B4v4r!4n_Str!k3r ([email protected])
Licence: THIS FILE AND EXTRACTS OF IT IS THE MINDSET OF CATIONSTUDIO
AND ONLY AUTHORIZED PEOPLE/SERVERS ARE ALLOWED TO USE IT.
Description:
Marks all ATMs on the Map
*/

if (!isServer) exitWith {};

// default atms on map
_atms = [];
{
if(["atm_",str(_x)] call BIS_fnc_inString) then {
_atms pushBack _x;
};
} foreach nearestTerrainObjects [[0,0,0],["HIDE"],30000];
{
_marker = createMarker [format["%1_marker",_x],visiblePosition _x];
_marker setMarkerColor "ColorGreen";
_marker setMarkerType "loc_Tourism";
} foreach _atms;


The function is not that performance friendly, but it works. And you only have to run it once on server start – so there should be no real performance problem.

So how to run the code? Either you add the code to your life_server and execute it via execVM in your init.sqf or you install ,if not already done, the cationstudio core system and download atmmarkers.zip, then copy the folder atm in <mission>/cation/ and insert 

#include "atm\functions.cpp"

in <mission>/cation/cation_functions.cpp and

#include "atm\config.cpp"

in <mission>/cation/cation_master.cpp and

#include "atm\remoteExec.cpp"

in <mission>/cation/cation_remoteExec.cpp.

All done!

If you wish to mark also your self placed ATMs on the map, enable it in
<mission>/cation/config.cpp


0 Comments

Leave a Reply