draoth 13 Posted February 14, 2018 Hey everyone, I've got a script that is running on server only, but i need to create a action that passes arguments from that script. When i try it online only the server host gets the action. So how can i create an action that passes arguments on a server script that everybody can use? Code: _veh addaction ["Stop here","Stop.sqf",[_veh,_pass,_AI],0,false,false,"",""]; Share this post Link to post Share on other sites
Grumpy Old Man 3540 Posted February 14, 2018 Use remotexec. Really simple syntax once you wrap your head around it. Cheers Share this post Link to post Share on other sites
draoth 13 Posted February 14, 2018 47 minutes ago, Grumpy Old Man said: Use remotexec. Really simple syntax once you wrap your head around it. Cheers Hey thanks for your reply, i kinda know how to use remotexec in some cases, but using it with addaction to pass a argument to a different script is beyond me. I've been trying some things since you've posted this but it has all been trash so far. [[[_veh,_pass,_AI],_veh,["Please stop here.",{Stop.sqf}]]] remoteExec ["addAction", 0, true]; This is something i've tried but it's probably rubbish Share this post Link to post Share on other sites
Grumpy Old Man 3540 Posted February 14, 2018 remoteExec requires the arguments you'd use with a command as an array, with the left side argument as first and the right hand argument as second element. hint "Hello"; ["Hello"] remoteExec ["hint",0]; //will make hint show up on all clients and server unit1 sideChat "Hello"; [unit1,"Hello"] remoteExec ["sideChat",0];//will make unit1 say Hello on all clients (if same side) [/CODE] Cheers Share this post Link to post Share on other sites