Jump to content
B4v4ri4n_Strik3r

Tutorial: Mark ATMs automatically on map

Recommended Posts

Today i'll 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;

 

It's not very 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 cationCoresystem.zip and download atmmarkers.zip, then copy the folder atm in <mission>/cation/ and insert 

#include "atm\functions.cpp"

in cation_functions.cpp and

#include "atm\config.cpp"

in cation_master.cpp and

#include "atm\remoteExec.cpp"

in cation_remoteExec.cpp - all right!

 

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

atms.thumb.jpg.4860bc02cd0136496d55df72ee12ce43.jpg

 

  • Like 2

Share this post


Link to post
Share on other sites
On 14.4.2017 at 11:49 PM, B4v4ri4n_Strik3r said:

<mission>/cation/ and insert 

#include "atm\functions.cpp"

in cation_functions.cpp and

#include "atm\config.cpp"

in cation_master.cpp and

#include "atm\remoteExec.cpp"

in cation_remoteExec.cpp - all right!

you have to insert these lines into the files.

At the beginning these files are empty but I have more system, so some costumers already have some lines in these files. As a result I can't write that you have to overwrite these files.

  • Like 1

Share this post


Link to post
Share on other sites
/*
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;

This file where it should be inserted?

 

 

Edited by Madanazzi

Share this post


Link to post
Share on other sites
3 hours ago, Madanazzi said:
This file where it should be inserted?

The tutorial tells you 2 ways of doing this, 1 with that file, and one without it:

On 4/14/2017 at 5:49 PM, B4v4ri4n_Strik3r said:

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 cationCoresystem.zip and download atmmarkers.zip, then copy the folder atm in <mission>/cation/ and insert 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.