Jump to content
Sign in to follow this  
gdscei

Call server-side script through client script

Recommended Posts

Is there a way to call a server-side script through a client script?

Thanks.

Share this post


Link to post
Share on other sites

example of how it should work

init

"FOCK_A10moveto" addPublicVariableEventHandler
 {
   private ["_moveto"];
  _moveto = _this select 1;
execVM _moveto;
 };

whatever.sqf - called from players addaction

FOCK_A10moveto = "skills\A10CAS\A10timeout.sqf"; publicVariable "FOCK_A10moveto"; // This data will only be received on other machines. Not on the machine where it is executed.
//therefore also run it for this machine
execVM FOCK_A10moveto;  

Share this post


Link to post
Share on other sites

Also look into publicVariableServer, just broadcasts to the server, works like a charm.

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  

×