W4lly Posted June 23, 2015 Report Share Posted June 23, 2015 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 More sharing options...
0 SideShowFreak Posted June 23, 2015 Report Share Posted June 23, 2015 You need to create an init.sqf file and add your code there. Put it in the root mission pbo and repack it. Hope this helps. Link to comment Share on other sites More sharing options...
0 W4lly Posted June 23, 2015 Author Report Share Posted June 23, 2015 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 More sharing options...
0 KiloSwiss Posted June 24, 2015 Report Share Posted June 24, 2015 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 More sharing options...
0 W4lly Posted June 24, 2015 Author Report Share Posted June 24, 2015 tnx KiloSwiss ... yea with publiVariable i have one working... just i wish dont use a PublicVariable :) ... for FPS is indiferent use PV or not? Link to comment Share on other sites More sharing options...
0 KiloSwiss Posted June 24, 2015 Report Share Posted June 24, 2015 If You don't send big piles of code and/or send a pubVar x times per second, it has no impact on performance or network traffic. Link to comment Share on other sites More sharing options...
Question
W4lly
Hi, im not expert coder ... maybe is simple.. :) for someone ..
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now