READTHESCROLL

Keep Scripts Server-Side?

28 posts in this topic

in init.sqf in the MPMissions file:

if (isServer) then {
call compile preProcessFileLineNumbers "\pboname\filename.sqf";
};

 

in addons make a folder "pboname" and place inside the file that calls for objects or anything you want server side "filename.sqf" then pack it into a pbo.

done.

Share this post


Link to post
Share on other sites
Advertisement

in init.sqf in the MPMissions file:

if (isServer) then {
call compile preProcessFileLineNumbers "\pboname\filename.sqf";
};

 

in addons make a folder "pboname" and place inside the file that calls for objects or anything you want server side "filename.sqf" then pack it into a pbo.

done.

You dont even have to call it from mission file if you setup your addon right with init class.

 

Some example:

 

config.cpp - in serverside addon Community.pbo

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

fn_init.sqf - serverside addon Community.pbo

diag_log format ['Starting Community MOD'];

call compile preprocessFileLineNumbers "\x\addons\Community\serverside\spawncrates.sqf";

$PREFIX$ - pbo prefix file in Community.pbo

x\addons\Community

 

  • Like 1

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.