Jump to content

Where to install custom scripts?


Tricks

Recommended Posts

A freind of mine has given me a simple script to try, he mentioned to out it in my Arma3 folder server side and call it from my init.sqf like so:

if(isServer) then {[] execVM 'Scripts\customscripts.sqf';};

Where would I create this "Scripts" folder? Next to my @whatever addon folders?

 

Thanks!

Link to comment
Share on other sites

is it in its own PBO? sounds like you drop it into your @epochhive/addons folder

 

if it is  @FOLDER did it come with key? it would req everyone to download it and put it in there arma 3 folder to just use it.

 

but with u have here 

if(isServer) then {[] execVM 'Scripts\customscripts.sqf';};

that's called from your mission folder so....many chocies

Link to comment
Share on other sites

is it in its own PBO? sounds like you drop it into your @epochhive/addons folder

 

if it is  @FOLDER did it come with key? it would req everyone to download it and put it in there arma 3 folder to just use it.

 

but with u have here 

if(isServer) then {[] execVM 'Scripts\customscripts.sqf';};

that's called from your mission folder so....many chocies

 

No its not a PBO but a single .sqf file. I would like to keep it server side. It is for admins only, players do not need to be able to access it.

Link to comment
Share on other sites

had to find the info again i could not rememeber off top of my head 

---------------------------------------------------------------------------------------

Install: Place the file into your @EpochHive/Addons folder.

 

 

Files:
Your Script
customscripts.sqf > Main file being called.

\init\
fn_init.sqf > File calling the customscripts.sqf from the location.


\root\
config.cpp > File that initializes SERVER pbo configurations.

PboPrefix.txt
Quality check to ensure that the files are being called.

 

then pack it up into a pbo and place it in your @epochhive\addons folder

 

that would keep it server side then next part is calling it

 

 

config.cpp

class CfgPatches {
	class custom_scripts {
		units[] = {};
		weapons[] = {};
		requiredVersion = 0.1;
		requiredAddons[] = {"A3_server_settings"};
	};
};
class CfgFunctions {
	class customs {
		class main {
			file = "x\addons\custom_scripts";
			class init {
				postInit = 1;
			};
		};
	};
}; 

PboPrefix.txt

x\addons\custom_scripts

$PREFIX$

x\addons\custom_scripts

fn_init.sqf

diag_log "Loading Custom scripts";
call compile preprocessFileLineNumbers "x\addons\custom_scripts\customscripts.sqf";

diag_log "Custom scripts Loaded";

customscripts.sqf

your code

thats how the inside of the pbo should look i cant find the original post about it sorry for the calling part it calls it right off the bat once server is loaded

 

hope some of this helps

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
  • Advertisement
  • Discord

×
×
  • Create New...