Sulu_03 0 Posted January 26, 2010 Hi everybody ! A teammate and i have created a mission with a radio system simulator. It works fine with the wonderful Teamspeak 3 SDK. We now want to make this script become an addon to avoid mission editing to make it works. Altough I searched how to do, i didn't find a reliable way to make the script start when the client join a multiplayer game. This script is only needed in MP game, and should start only one time per game whatever the kind of soldier player choosed to play. No P3D, no redefinition of any object, just this script for anyone. No server side is needed. Sorry for my poor english and thanks for any help you provide ! Share this post Link to post Share on other sites
fincuan 0 Posted January 26, 2010 (edited) Put this to config.cpp: class Extended_PostInit_EventHandlers { class someNiceNameForTheClass { clientInit = "if (isMultiplayer) then {call compile preProcessFileLineNumbers 'pathToScript'}"; }; }; And make your cfgPatches "requiredAddons" look something like this: class CfgPatches { class Someclassname { .... requiredAddons[] = { "Extended_EventHandlers" }; .... }; }; Your addon now requires CBA, more precisely the ExtendedEventHandlers part of it, but at least it works :) Edited January 26, 2010 by Fincuan Share this post Link to post Share on other sites
Sulu_03 0 Posted January 26, 2010 (edited) And that's all ? :eek: I don't know how to thank you ! :) Edited January 26, 2010 by Sulu_03 Share this post Link to post Share on other sites
fincuan 0 Posted January 26, 2010 Yeah that should be all. The script is now started EXACTLY once per mission, in MP just before you enter the briefing screen with the map. Share this post Link to post Share on other sites
Sulu_03 0 Posted January 27, 2010 It works fine ! Here is my config.cpp class CfgPatches { class armats { requiredAddons[] = {"Extended_EventHandlers"}; }; }; #include "\armatsbwf\description.h" class Extended_PostInit_EventHandlers { class armatsbwf { clientInit = "if (isMultiplayer) then {call compile preProcessFileLineNumbers '\armatsbwf\init.sqf'}"; }; }; Thank you Fincuan ! Share this post Link to post Share on other sites