Commit 6a9c9d5c authored by Razer's avatar Razer

Updated InitClient and InitServer examples

parent f6a23263
......@@ -233,6 +233,7 @@ Note: the \texttt{units[]~=~\{\};} is required to make the Plugin \ac{CBA} compa
To define the Informations about the Plugins including its name and description you have to use the \texttt{Plugins} keyword. The required flags are \texttt{name}, \texttt{desc} for the description as well as \texttt{tag}. The \texttt{tag} will be used as prefix for defined functions. In the following example the \texttt{tag} is named \texttt{EXP} so the resulting functions will be \texttt{EXP\_fnc\_FunctionName}.
Only name and tag are required.
An example for this section is the following:
class Plugins
......@@ -241,6 +242,8 @@ class Plugins
name = "ExamplePluginName";
desc = "An Example Plugin for the Handbook";
version = 1;
requiredPlugins[] = {"plugin1","plugin2","plugin3..."};
tag = "EXP";
......@@ -298,11 +301,46 @@ class CfgFunctions
For more examples about the definition of functions take an Plugin like the database Plugin of \ac{APMS}:
\url{} % TODO (Update - ApmsDB)
\subsection{Server & Client Inits}
No parameters are passed into \texttt{fn_InitClient}. However, plugin load index and server command password are passed into \texttt{fn_InitServer}.
But to be able to pass the correct password into \texttt{fn_InitServer}, you need to make sure that you have set the server command password in \texttt{Config\\PluginManager.cfg} file.
An example for fn_initClient:
EXP_var_value = 100;
EXP_var_array1 = [];
player setVariable ["EXP_var_variable1",true,true];
player setPosATL [0,0,0];
[] spawn EXP_fnc_handlePlayers;
_data = call EXP_fnc_getData;
[_data,player] remoteExec ["setData",2];
An example for fn_initServer:
_id = _this select 0;
_password = _this select 1;
EXP_var_value = 100; // Server variable
EXP_var_array1 = []; // Server variable
setDate [2018, 10, 25, 10, 0];
str(_password) serverCommand "#lock";
call EXP_fnc_spawnObjects;
_group = createGroup east;
"B_RangeMaster_F" createUnit [[10,1556,0],_group];
\subsection{Plugin Events}
......@@ -313,7 +351,7 @@ For more examples about the definition of functions take an Plugin like the data
\subsection{Replace Buildings}
% \url{}
% \url{} % TODO (Update - ApmsDB)
% \begin{lstlisting}
% \begin{dndtable}[cX][DmgCoral]
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment