hmm. seams easy enough. but i cant get it to work.
on my server i placed @cba in my arma2 install dir.
using mod parm. mod=@cba;@myserveraddon on the server startup.
i see the rpt log says.
[7877,115.793,0,"XEH: PreInit Started"]
[7877,115.91,0,"MISSINIT","-British_Army_Forces-co30_Domi","Takistan",true,true,true]
[7877,116.435,0,"XEH: PreInit Finished"]
so im assuming the init xeh is started.
config.cpp
#include "CfgPatches.hpp"
#include "Extended_Init_EventHandlers.hpp"
CfgPatches.hpp
class CfgPatches {
class MyServerAddon
{
units[] = {};
weapons[] = {};
requiredVersion = 0.1;
requiredAddons[] = {};
version = 0.1;
fileName = "myserveraddon.pbo";
author = "";
mail = "";
};
};
Extended_Init_EventHandlers.hpp
class Extended_Init_EventHandlers {
class Man
{
My_Man = '[] execvm "\myserveraddon\sqf\init.sqf"';
};
};
i cant get this to work.
when i connect to my server it says im missing cba_main..
thats really anoying. since i want it to be server sided only. and clients should not need to get such message, since they dont depend on it.
but anyway. if i put
if ((isServer) or (isDedicated)) then
{
nil = [] execvm "\myserveraddon\sqf\init.sqf";
};
in the init of a mission it works like a charm.
so where am i doing wrong here??
should i use class Extended_PreInit_EventHandlers instead?
with
serverInit = "[] execvm '\myserveraddon\sqf\init.sqf';";
im verry confused here.