Jump to content
  • 0

Arguments from server to mission


W4lly

Question

Hi, im not expert coder ... maybe is simple..  :)  for someone ..

how can  start a script residing in mission from a script residing on a server addon
passing a arguments like  nul = [_arg] execVM "scripts \ script.sqf";
 
I want to delete a PV that I'm using now ...
thanks

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Hi bro ...maybe i have explained bad ....

I have a script called by     addon\myaddon.pbo\init\fn_init.sqf    ------------->   myscript.sqf  ....

from   this   i want exec a script inside  mission  nul = [_arg] execVM "scripts \ mission_script.sqf";  when a condition is satisfied ...and this is not a problem....

problem is that i dont know how to pass [_arg]  from server to client script ....  i cant pass  ...

when u use inside  mission_script.sqf";      _myvar  = _this select 0; ....doesnt work obviously ...

is possible passing args from server to client?

my knowledge is limited

 

tnx 

Link to comment
Share on other sites

  • 0

Use Google and the BIS Wiki as a source of information!

 

Waht you are searching for can be found here: publicVariable

 

If you want to trigger a script by this, use a PublicVariableEventHandler on the client.

 

Keep in mind that the init.sqf is executed by both client and server (see this WIKI page Event_Scripts), so you might want to differentiate them by using "if(isServer)then{ <SERVER CODE> }else{ <CLIENT CODE> };"

 

Greez KiloSwiss

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...