Jump to content

Sign in to follow this  
MHSProductions

HideObjectGlobal not working for other players

Recommended Posts

Im scripting an ace interaction to gear up. Basically the player will interact via ace with an object, the script will start and during the process the object will get hidden.

But in MP, it just doesnt work in any way.
I tried HideObject, HideObjectGlobal, RemoteExec, both in 0 and 2, and right now Im even trying to use Functions. Every single part of the script is working, except the part of hiding the objects after the player interaction.

Ace_interaction init:

rifle_05_action = ["rifle_05_action","Pegar Fuzil","",{ [rifle_05, rifle_05_a] execVM "gaiolas\weapon_FzAss.sqf"; },{true}] call ace_interact_menu_fnc_createAction; 
rifle_05_store = ["rifle_05_store","Guardar Fuzil","",{ [rifle_05, rifle_05_a] execVM "gaiolas\weapon_rifle_store.sqf"; },{true}] call ace_interact_menu_fnc_createAction; 
[rifle_05_a, 0, ["ACE_MainActions"], rifle_05_action, true] call ace_interact_menu_fnc_addActionToObject;

weapon_FzAss.sqf:

_rifle = _this select 0;
_rifleact = _this select 1;
_rifle_action = str _rifle + "_action";
_rifle_store = str _rifle + "_store";
_rifle_store = call compile _rifle_store;

[_rifle] remoteExecCall ["Hide_1ObjectMP", 0, true];

player addWeapon "prbraz_ia2_556_F"; [ace_player, 'Acts_Rifle_Operations_Checking_Chamber'] remoteExec ['switchMove', 0];
[_rifleact, 0,["ACE_MainActions", _rifle_action]] call ace_interact_menu_fnc_removeActionFromObject;
[_rifleact, 0,["ACE_MainActions"], _rifle_store, true] call ace_interact_menu_fnc_addActionToObject;

fn_hide

Hide_1ObjectMP =
{
private["_object"];
_object = _this select 0;

hint format ["Escondendo objeto %1", _object]; // Mensagem de depuração

[_object, true] remoteExec ["hideObjectGlobal", 0];


};

and of course my init.sqf
 

[] call compile preprocessFileLineNumbers "fn_hide1object.sqf";
[] call compile preprocessFileLineNumbers "fn_unhide1object.sqf";

The host can execute everything and it works fine, even the hiding part, but when other players try it, it doesn't work

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  

×