Jump to content

Recommended Posts

Hello I'm just trying to figure out how i get this command a mod owner gave me to disable a function in his mod.

we could always use the debug to execute it globally but I'm trying to find other ways

I made the init.sqf and the myscripft.sqf but I'm not to sure what to put in.

This is the command that I need to have execute at the start of the mission globally ---- dceTeleport=FALSE;

Share this post


Link to post
Share on other sites

The file is init.sqf, not ini.sqf, so make sure you've got that right. As init.sqf executes on each client just add that line and all clients will set the variable to false.

 

Is there supposed to be anything else in myscript.sqf?

  • Like 2

Share this post


Link to post
Share on other sites

Maybe you should provide more information on the problem. We can't really know exactly what you want with what you have provided.

 

Regarding the code you provided, it is not clear as to where exactly you have placed the

dceTeleport = FALSE;

but if you have placed it inside the init.sqf (and not ini.sqf) it will make this variable equal to false. If the mod you refer to makes use of it to disable some of its functionality is unknown to me, so I will assume that the mod maker has instructed you to do so, thus it is what you want to achieve. This approach makes the use of myscripft.sqf (should it be myscript.sqf?) obsolete 'cause there's no apparent need for it (unless you call it somehow, but it is still irrelevant to the question).

 

On the other hand, if you have the code you provided inside the myscripft.sqf and assuming that this is what you want to execute, then you could execute your script inside the init.sqf like

private _nil = [] execVM "myscripft.sqf";

or with a call

[] call compile preprocessFileLineNumbers "myscripft.sqf";

If any of those does not suit your needs please feel free to ask again. Once more, if you provide more information it will  be easier to provide a better solution.

  • Like 1

Share this post


Link to post
Share on other sites

Yeah I missed typed I meant the init.sqf.

I got the myscript.sqf idea from YouTube video that was old as anything. I basically want to use that command line " dceTeleport = FALSE; " and have it execute globally. We use the Debug console and it worked but we are trying to find another way to just have it in the mission by default with out using the Debug Console to execute.

  • Like 2

Share this post


Link to post
Share on other sites

Without the scripts, their effects and validity (whether client-side or server-side), we can hardly help you, because the approaches are different. 

  • Like 2

Share this post


Link to post
Share on other sites

I don't know how the Drongo's mod is made but perhaps, you have an initialization order issue. Did you test it in SP or MP, for example (the order is different)?

If that fails in init.sqf but it's OK on console, just try the line in initPlayerLocal.sqf (add it on root if necessary)

or, in init.sqf:

[] spawn {waituntil {time >0}; dceTeleport = FALSE};

 

  • Like 2

Share this post


Link to post
Share on other sites

Hi there!
Being new to scripting you may want to take a look here aswell

Towards the bottom, you will also find links to more specific scenarios 🙂
 

  • Thanks 1

Share this post


Link to post
Share on other sites

the owner of the Mod said to try initPlayer.sqf and put a sleep 10; at the start. I did that too but still didnt work i feel like im missing something in the files or writing the lines wrong. Okay @razzored thanks ill take a look there too.

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

×