Barba-negra 117 Posted August 13, 2018 hello all friends a greeting, I come here asking for help, I am currently using a scripts to sit on chairs in multiplayer, I was previously using this scripts in the chair 1.Place a Camping Chair on the map. 2.Add this to the Camping chair Init: this addAction ["<t color='#0099FF'>Sit Down</t>","Chair\sitdown.sqf"] this scripts sitdown _chair = _this select 0; _unit = _this select 1; [[_unit, "Crew"], "MAC_fnc_switchMove"] spawn BIS_fnc_MP; _unit setpos (getpos _chair); _unit setDir ((getDir _chair) - 180); standup = _unit addaction ["<t color='#0099FF'>Stand Up</t>","scripts\Chair\standup.sqf"]; _unit setpos [getpos _unit select 0, getpos _unit select 1,((getpos _unit select 2) +15002)]; but the problem of this initial scritps is that the player when getting up did it without problem, but the other player still saw him sitting, it seems that the action of the animation to get up was in local, then he modified this line to multiplayer in the scritps to sit down standup = _unit addaction ["<t color='#68ccf6'>Levantarse</t>",{["scripts\Chair\standup.sqf","BIS_fnc_execVM",true,false] spawn BIS_fnc_MP;}]; The Standup scripts contain the following: player switchMove ""; player removeaction standup but the problem of this modification is that when using the action get up, raise all the players who are sitting, then I do not know how I could fix it, help please, I use this scripts because it allows me to use actions with the menu mouse scroll with objects that have functions of addAction, because I have seen others that the player can sit but does not allow to interact with objects while sitting Share this post Link to post Share on other sites
stanhope 411 Posted August 13, 2018 1 hour ago, elthefrank said: standup = _unit addaction ["<t color='#68ccf6'>Levantarse</t>",{["scripts\Chair\standup.sqf","BIS_fnc_execVM",true,false] spawn BIS_fnc_MP;}]; The Standup scripts contain the following: player switchMove ""; player removeaction standup but the problem of this modification is that when using the action get up, raise all the players who are sitting That's because you're executing it globally. Check the 3rd param of https://community.bistudio.com/wiki/BIS_fnc_MP 1 hour ago, elthefrank said: [[_unit, "Crew"], "MAC_fnc_switchMove"] spawn BIS_fnc_MP; Could you share the code for this function? Any reason you're using bis fnc mp and bis fnc execVM instead of remoteExec and execVM? Share this post Link to post Share on other sites
Barba-negra 117 Posted August 13, 2018 good the scritps is not mine, it is from another person, from here exactly but reading a little more I could see that another person published another scritips, I'm going to try it friend Share this post Link to post Share on other sites
gokitty1199 225 Posted August 13, 2018 this is just a whole mess of a script lol. the reason all players stand up is because its using player switchMove ""; so when it runs, it runs for ALL players on their own unit. he should of passed the unit the action was assigned to to the script such as _chair = _this select 0; _unit = _this select 1; [_unit, "Crew"], remoteExecCall ["MAC_fnc_switchMove", 0, false]; _unit setpos (getpos _chair); _unit setDir ((getDir _chair) - 180); _unit setpos [getpos _unit select 0, getpos _unit select 1,((getpos _unit select 2) +15002)];//tf is this for? _unit addaction ["<t color='#0099FF'>Stand Up</t>", { params ["_unit", "_caller", "_id"]; _unit removeAction _id; [_unit, ""] remoteExec ["switchMove", 0, false]; }]; 2 Share this post Link to post Share on other sites
Barba-negra 117 Posted August 13, 2018 ohh great gokitty1199 : - D I will try it right now, thanks Fellow Share this post Link to post Share on other sites