Jump to content
Sign in to follow this  
BEAKSBY

BIS_fnc_execRemote

Recommended Posts

Has anyone used this funtion yet? If so how to I use it to run the following on a clients machine

_sum = _this select 0;
OPPmoney = OPPmoney + _sum;
if (hint format ["You have %1$", OPPmoney]; // DID NOT WORK ON LAN 

Share this post


Link to post
Share on other sites

Beaksby - give a try to this, I used this to execute a script to addaction to every player in the _array

{[ [[_x],"my_script_to_be_executed.sqf"], "BIS_fnc_execVM", _x, false] call BIS_fnc_MP;} foreach _myunit_array;

Share this post


Link to post
Share on other sites

Thanks everyone, I'm loving all the support for all my script help BTW!

From my other post, see http://forums.bistudio.com/showthread.php?178199-Hint-message-problem-with-my-MP-money-script

I tried to incorporate spawn BIS_fnc_MP in the following, but it only managed to display the WEST money generated on the EAST side's player's screen.

PHP Code:

{

switch (side _x) do {

case WEST: {if (side _x != playerSide) then {_x addEventHandler ["Killed", {[[[100],"BLUaddMoney.sqf"],"BIS_fnc_execVM", WEST,true] spawn BIS_fnc_MP;}];};};

case EAST: {if (side _x != playerSide) then {_x addEventHandler ["Killed", {[[[100],"OPPaddMoney.sqf"],"BIS_fnc_execVM", EAST,true] spawn BIS_fnc_MP;}];};};

default {};

};

} foreach allUnits;

How do MP games, like Stratis life, display hints to only the client players?

---------- Post added at 17:16 ---------- Previous post was at 17:11 ----------

Beaksby - give a try to this, I used this to execute a script to addaction to every player in the _array

So _x is the array of players? How did you address them [player1, player2...etc.] I don't have names for them as my players can respawn throught the game or I simply don't know where to find their names, in the mission file? I'm using the respawn template from BIS.

Also, I'm not sure what I should put in for this "foreach _myunit_array;"

Thanks for your help also!

Share this post


Link to post
Share on other sites

Lets try another architecture.

What if you make sure main script is executed on all players like in example I posted earlier, and then once every client gets his instance running separate sides there in the secondary script, if BLUFOR do task 1 if OPFOr then task 2. Just a quick idea of workaround mate.

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  

×