Jump to content
Sign in to follow this  
drunken officer

Loading script from server

Recommended Posts

Hello.
I need a command or script, that the mission can load a file from server. It's a dedi-server. The arma3server.exe is on server and there is a folder userconfig\BW_Ranksign\ranks.hpp

Why i need this?

If the mission use BW_Ranksign, all players need a variable & a value. ["DOF_RANK", 1 -23]
Inside a community are different ranks. Sometimes, one of them members promoted to the next rank. If this variable set on mission, in this case, all missions have to change and upload again. It's a lot of work.

My target is, that the serveradmin have to change only one file on server.

 

At the moment i try this way, but it doesnt works.

 

ServerInit.sqf

#include "\userconfig\BW_Ranksign\ranks.hpp";

 

 

Ranks.hpp

private ["_einheiten"];
if (isMultiplayer) then {_einheiten = playableUnits} else {_einheiten = switchableUnits };
{
_name = name _x;

switch (_name) do
{
        case "Drunken Officer" : { _x setVariable ["DOF_RANK", 13,true]};
        case "Miller" : { _x setVariable ["DOF_RANK", 9,true]};
        case "Emmo" : { _x setVariable ["DOF_RANK", 13,true]};
        default { _x setVariable ["DOF_RANK", 1,true] };
};
} forEach _einheiten;


At the moment, the game checks only the local userconfig folder. But i need to check the folder on server.

I tested it with a dedi-Server started with TADST, there it works.

Greez.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×