Jump to content

Recommended Posts

I'm having a problem with this:

call {
if (ReinforcementEnable == 1) exitWith {
removeAllActions player;
player addAction["Chopper Reinforcement", "chopperreinforcement.sqf"];};

if (ReinforcementEnable == 0) exitWith {
removeAllActions player;
player addAction["Paradrop Reinforcement", "paradropreinforcement.sqf"];};
};

is that right??

the addAction is not showing up in the scroll menu,

Share this post


Link to post
Share on other sites

Depends on where you are executing this and if the reinforcement variable exists before you call it.

  • Like 1

Share this post


Link to post
Share on other sites

Please read this documentation page: addAction

 

As you can see, addAction is a local command. It will only add an action item to the player on the machine where the command is executed. If you are struggling with the concept of locality, please have a look here: Locality in Multiplayer

 

If executing this command on the server, I recommend you try the following snippet:

// Server-side code

{player addAction ["Chopper Reinforcement","chopperreinforcement.sqf"];} remoteExec ["bis_fnc_call", 0]; // calls above code on all clients

Code not tested

 

Here is the link to the remoteExec documentation.

 

 

Hope that helps,

Bull

  • Like 1

Share this post


Link to post
Share on other sites

I'm having a problem with this:

call {

if (ReinforcementEnable == 1) exitWith {

removeAllActions player;

player addAction["Chopper Reinforcement", "chopperreinforcement.sqf"];};

if (ReinforcementEnable == 0) exitWith {

removeAllActions player;

player addAction["Paradrop Reinforcement", "paradropreinforcement.sqf"];};

};

is that right??

the addAction is not showing up in the scroll menu,

 

if ReinforcementEnable is undefined nothing will show. Use -showScriptErrors startup param

  • Like 1

Share this post


Link to post
Share on other sites

if ReinforcementEnable is undefined nothing will show. Use -showScriptErrors startup param

with this command I managed to find my mistake .. thanks guys !!

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

×