Jump to content
Sign in to follow this  
jamison1234

SetVehicleInit to BIS_fnc_MP

Recommended Posts

I need help changing this:

_x SetVehicleInit Format["[this,%1,%2] spawn Compile PreprocessFile (""Client\Init\Init_BaseStructure.sqf"")",_type,GetDir _x];

...to work with Arma 3 (BIS_fnc_MP).

So far I have this:

Server_Init =
{
private["_object","_script"];
_object = _this select 0;
_script = _this select 1;
_object _script;
};
[[_x,(Format["[this,%1,%2] spawn Compile PreprocessFile (""Client\Init\Init_BaseStructure.sqf"")",_type,GetDir _x])],Server_Init,nil,true] spawn BIS_fnc_MP;

I know this is completely wrong but I would like to have it in this format.

I have looked on the wiki and several other websites but nothing helps me to change this. I just don't understand BIS_fnc_MP.

Share this post


Link to post
Share on other sites

Just so your aware (if you didn't intend), with the way you have it setup, this will be called on every JIP:

fnc_setVehicleInit =
{
(_this select 0) setVehicleInit (_this select 1);
};

[
[
	_x,
	format ["[this,%1,%2] spawn Compile PreprocessFile (""Client\Init\Init_BaseStructure.sqf"")",_type,GetDir _x]
],
"fnc_setVehicleInit",
nil,
true,
false
] call BIS_fnc_MP;

EDIT: Ok, am I just crossed eyed, or does the setVehicleInit command not exist? Because it is no where on here: https://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3

Edited by JShock

Share this post


Link to post
Share on other sites

I'm aware that it will call on every JIP. It has to be called because some vehicles/structures are created locally and some are not when it is played as multiplayer.

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  

×