Jump to content

Add ATMs in traders (Altis)


Narines

Recommended Posts

Hi,

 

This script is extremely simple.

 

1 - In '@epochhive/addons' add the following pbo (traderATMs.pbo) :

 

https://dl.dropboxusercontent.com/u/63143678/epoch_scripts/traderATMs.pbo

 

2 - In your 'MPMissions' folder, unpack 'epoch.Altis.pbo'

 

3 - In your unpacked 'epoch.Altis' folder, open init.sqf and add the following at the very top :

if (isServer) then {
    execVM "\q\addons\traderATMs\init.sqf";
};

Note : if there is no init.sqf in the root of your unpacked 'epoch.Altis' folder, just create one.

 

4 - Repack 'epoch.Altis' into 'epoch.Altis.pbo'

 

That's it !

 

**EDIT** Optimized following Kroenen's suggestions

Link to comment
Share on other sites

  • 1 month later...

Epoch server settings would be changed every patch, so not the best place for these changes.

 

Surely an even better place for it would be creating an atms.sqf inside a custom pbo in @Epochhive\addons\ - I run all my map edits from there, and it seems to work quite well :)

 

Like so;

private ["_objs"];
_objs = [
	["Land_Atm_01_F", [13326.2,14498.5,0],248,[0,0,1],true],
	["Land_Atm_01_F", [6199.3,16847.2,0],56,[0,0,1],true],
	["Land_Atm_01_F", [18468.7,14268.9,0],86,[0,0,1],true]
];
 
{
	private ["_obj"];
	_obj = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"];
	if (_x select 4) then {
		_obj setDir (_x select 2);
		_obj setPos (_x select 1);
	} else {
		_obj setPosATL (_x select 1);
		_obj setVectorDirAndUp (_x select 3);
	};
} foreach _objs;

Link to comment
Share on other sites

Surely an even better place for it would be creating an atms.sqf inside a custom pbo in @Epochhive\addons\ - I run all my map edits from there, and it seems to work quite well :)

 

It would be a better place since it wouldn't add to the mission file size.

Thx for the suggestion, I am just starting with arma 3 scripting.

 

**EDIT - I applied your suggestions and changed the installation instructions in initial post. Thanks**

Link to comment
Share on other sites

BE filter scripts? as my players are getting kicked off

 

If it kicks you players, it is because you didnt call the sqf inside the "if(isServer)then{}" condition.

 

Make sure you put the exact code below on the first line of your init.sqf 

 

 **NOTE - I changed the installation method so make sure you are using the new method or the following code won't work. Check initial post for installation instructions.**

if (isServer) then {

    execVM "\q\addons\traderATMs\init.sqf";

};
Link to comment
Share on other sites

you can do same in client side.

Make file atm.sqf and add

private ["_objs"];
_objs = [
	["Land_Atm_02_F",[1111111.1,2222222.1,3333333.1],4444444.1,[[-0.998458,0.0555049,0],[0,0,1]],false]
//                1111111-X cords 222422-Y cords 333333-Z cords  4444444-direction
];

{
	private ["_obj"];
	_obj = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"];
	if (_x select 4) then {
		_obj setDir (_x select 2);
		_obj setPos (_x select 1);
	} else {
		_obj setPosATL (_x select 1);
		_obj setVectorDirAndUp (_x select 3);
	};
} foreach _objs;

run it from init.sqf 

 

[] execVM "atm.sqf";

Link to comment
Share on other sites

Nice it is working. But after putting the code it in the init.sqf inside my missionPBO folder my custom mapmarker will not work anymore.

I start them by using null =[] execVm "SR.sqf"; in the same init.sqf.

Any ideas why this happening to me? Removing the code from you will turn everything back and it is working fine again.

 

greetz

lahlor

Link to comment
Share on other sites

Nice it is working. But after putting the code it in the init.sqf inside my missionPBO folder my custom mapmarker will not work anymore.

I start them by using null =[] execVm "SR.sqf"; in the same init.sqf.

Any ideas why this happening to me? Removing the code from you will turn everything back and it is working fine again.

 

greetz

lahlor

 

Woah. Guess I was more tired than I thought when I posted this last night.

 

I forgot a ';' at the end of 'if(isServer)then{};'.

 

The code you should put at the top of your init.sqf is the following :

if (isServer) then {

    execVM "\q\addons\traderATMs\init.sqf";

};

Will update the info in my previous posts. Real sorry for that. 

Link to comment
Share on other sites

  • 2 weeks later...

Hi I wonder if some one can help me im trying to add this to my server but im getting kicked by BattEye

 

10:36:59 BattlEye Server: Script Log: #0 JamieKG (***********************) - #21 "e 1 "mpmissions\__CUR_MP.Altis\init.sqf"
10:36:59   if (isServer) then {
10:36:59   execVM "\q\addons\traderATMs\init.sqf";
10:36:59   };
10:36:59   
10:36:59   #line 1 "mpmissions\__"
10:36:59 Player JamieKG kicked off by BattlEye: Script Restriction #21
10:36:59 Player JamieKG disconnected.

here is a my init.sqf

if (isServer) then {
    execVM "\q\addons\traderATMs\init.sqf";
};

#include "A3EAI_Client\A3EAI_initclient.sqf";
the other addons I have are
 
 
and
 
 
 
Thanks in advance for any help received
 
JamieKG 
 
 
 
Edit Just to add ive tried just this mod and only your code in init.sqf and I still receive a kick
Link to comment
Share on other sites

Would !execVM "\q\addons\traderATMs\init.sqf";   be what I enter in the Scripts file?

 

Still new at this and at times I cant even get stuff to work on my server with it all spelled out for me, but I am trying to figure this all out.

 

Also does \q  point to the mission pbo by default? Or could this be a server specific variable I need to change?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...