Jump to content
Sign in to follow this  
ShadowRanger24

BIS_fnc_MP & remoteExec Not Working

Recommended Posts

Hi there.

 

So I'm currently working on a script which creates light points on vehicles. I'm trying to use BIS_fnc_MP or remoteExec to run the script which creates the lights on all players but I can't seem to get it working. Is there anything that would cause these functions to not execute properly on all players? It seems to only be working on the player that the MP function is being called on, instead of everyone like it should. I'm using it like this:

 

[[], "functionName", true, false] spawn BIS_fnc_MP;
[] remoteExec ["functionName", 0];

 

If you need to see the actual script then let me know. But I don't think that would change much.

Share this post


Link to post
Share on other sites

remoteExec works just fine, so yes.... post your actual function. Without it you post gives us pretty much nothing to work with.

Another question is where/how do you define your function?

Share this post


Link to post
Share on other sites

BIS_fnc_MP is the same as remoteExec now. Just as a sidenote.

 

You either disallowed it via CFGRemoteexec or didn't whitelist it etc.

 

Please post your full line of remoteexec, the function you try to execute and a rpt log where the function should have been called in

 

 

Regards Arkensor

  • Like 2

Share this post


Link to post
Share on other sites

BIS_fnc_MP is the same as remoteExec now. Just as a sidenote.

 

You either disallowed it via CFGRemoteexec or didn't whitelist it etc.

 

Please post your full line of remoteexec, the function you try to execute and a rpt log where the function should have been called in

 

 

Regards Arkensor

// Hazards
case 1: {
    if (_vehicle getVariable ["hazards", false]) then {
        _vehicle setVariable ["hazards", false, true];
    } else {
        _vehicle setVariable ["hazards", true, true];
 
        _lights = _lightPositions select {(_x select 0) isEqualTo (typeOf _vehicle)} select 0;
        [_vehicle, _lights, 1] remoteExec ["SR_fnc_handleVehLights", 0];
    };
};
 
The SR_fnc_handleVehLights function is defined in CfgFunctions and not in CfgRemoteExec. Do I need to whitelist it? I didn't think you needed to.

Share this post


Link to post
Share on other sites

Hello there,

 

your line on sending stuff is ok.

 

For information on how that magic stuff around whitelist blacklist etc works visit the wiki here: https://community.bistudio.com/wiki/remoteExecand here https://community.bistudio.com/wiki/Arma_3_Remote_Execution.

 

Everything is explained pretty well there, but if you still have got questions goahead and ask me ;)

 

 

Regards Arkensor

Share this post


Link to post
Share on other sites

Hello there,

 

your line on sending stuff is ok.

 

For information on how that magic stuff around whitelist blacklist etc works visit the wiki here: https://community.bistudio.com/wiki/remoteExecand here https://community.bistudio.com/wiki/Arma_3_Remote_Execution.

 

Everything is explained pretty well there, but if you still have got questions goahead and ask me ;)

 

 

Regards Arkensor

Thanks for the help Arkensor. I have already looked through the wiki pages trying to see what may be causing it. I didn't think you needed to whitelist the functions in CfgRemoteExec as by default it ignores whitelisting? Its just weird how this isn't working because it gets called on the player where the remoteExec is being called, but not on the other players on the server. Sometimes it even executes twice on the one player. I just don't understand why it's not executing on all players as I'm clearly instructing it to do so.

Share this post


Link to post
Share on other sites

Solved the issue. Turns out it was 1 line of code in the file that was being executed which caused it to look like it wasn't being called but it actually was. Anyways, all sorted. Thanks for your help guys.

  • Like 1

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  

×