mikie boy 18 Posted October 6, 2013 Sorry chaps been a while since any real MP scripting in last 6 months, and thus on attempting to piss around with BIS_fnc_MP I cannot get a file to be executed for a specific player/client checked the BIS_fnc_MP wiki - mentioned something about id as part of the available parameters - "Number - function will be executed only on client with the given ID" firstly what is the id? uid or netid? if its either i have tried both with no joy. e.g if (isserver) then { //load of code _net = netid _resel; [[],"gui\secopscallmenu.sqf","BIS_fnc_execVM",_net,false] spawn BIS_fnc_MP; }; _resel is a player picked out of an array - back in A2 - [nil,_resel,"loc",rEXECVM,"gui\secopscallmenu.sqf"] call re; - worked no problem and the one file would be called for that specific player - now i have no idea, and what i have ready have had no luck with if its netid - must admit not familiar with it and would appreciate a point in the right direction Any help would be appreciated. Share this post Link to post Share on other sites
cuel 25 Posted October 6, 2013 Try changing _net to _resel in the bis_fnc_mp line :). It can take a target parameter ---------- Post added at 10:22 PM ---------- Previous post was at 10:20 PM ---------- IIRC. If not, use the owner command Share this post Link to post Share on other sites
blackmamb 2 Posted October 6, 2013 Have you tried simply: [[],"gui\secopscallmenu.sqf","BIS_fnc_execVM",_resel,false] spawn BIS_fnc_MP; Edit: Dammit, can't read. Share this post Link to post Share on other sites
mikie boy 18 Posted October 6, 2013 _clientID = owner _resel _uid = getplayeruid _resel; _net = netid _resel; //Ensure only the GUI gets called for selected Player from Array [[],"gui\secopscallmenu.sqf","BIS_fnc_execVM",_clientID,false] spawn BIS_fnc_MP; alas neither idea work - appreciate it though - thought the owner would have done it unless its not in the correct place Share this post Link to post Share on other sites
Larrow 2822 Posted October 6, 2013 (edited) [b][[color="#FF0000"] [ [], "gui/secopscallmenu.sqf" ][/color],[color="#DAA520"] "BIS_fnc_execVM",[/color][color="#008000"] _resel[/color], false ] call[color="#008000"] BIS_fnc_MP[/color];[/b] BIS_fnc_execVM is sent one array of [ args, function ]. BIS_fnc_execVM is run by BIS_fnc_MP where _resel is local. Edited October 6, 2013 by Larrow Share this post Link to post Share on other sites
tonic-_- 53 Posted October 6, 2013 The owner method will work, or you can pass the unit object its self. Note that owner only works for the dedicated server, if it is executed on the client 0 is returned (which is the server). Share this post Link to post Share on other sites
mikie boy 18 Posted October 7, 2013 unfortunately - neither [ [ [], "gui/secopscallmenu.sqf" ], "BIS_fnc_execVM", [color="#FF0000"]_resel[/color], false ] call BIS_fnc_MP; or [ [ [], "gui/secopscallmenu.sqf" ], "BIS_fnc_execVM", [color="#FF0000"]_clientID[/color], false ] call BIS_fnc_MP; seem to work not sure if its something else - basically - for testing purposes i tried this file1.sqf if (isserver) then { execvm "file2.sqf"; }; file2.sqf PVHint = "hello"; publicvariable "PVHint"; hint "hello locally"; sleep 2; execvm "file2.sqf"; file3.sqf PVHint = "hello file three public"; publicvariable "PVHint"; hint "hello file 3.sqf"; sleep 2; for some reason - file one calls file two -which hints - however file three is never called - even for server? Any suggestions? Share this post Link to post Share on other sites
blackmamb 2 Posted October 8, 2013 This [ [ [], "gui/secopscallmenu.sqf" ], "BIS_fnc_execVM", _resel, false ] call BIS_fnc_MP; should work... except it should be [ [ [], "gui\secopscallmenu.sqf" ], "BIS_fnc_execVM", _resel, false ] call BIS_fnc_MP; Also you probably don't need to pass arguments if they're an empty array. Share this post Link to post Share on other sites
mikie boy 18 Posted October 8, 2013 @black mamba - many thanks dude - what a dick i am not seeing that forward slash!!!!!!! may thanks to the rest of you for the assistance Share this post Link to post Share on other sites