5 posts in this topic

Posted (edited)

Hi,

How to automatically enable the XM8 when u enter the game? So like u press 6 but not the x, i saw a server where it was online already.

Cheers

 

 

/**
 * ExileClient_gui_xm8_togglePower
 *
 * Exile Mod
 * www.exilemod.com
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_display","_control","_controlsToShow","_backgroundSplash"];
disableSerialization;
_display = uiNameSpace getVariable ["RscExileXM8", displayNull];
if (diag_tickTime > ExileClientXM8NextPossiblePowerToggleTime) then
{
    if (ExileClientXM8IsPowerOn) then
    {
        ExileClientXM8NextPossiblePowerToggleTime = diag_tickTime + 1;
        playSound ["SndXM8PowerOff", true];
        {
            _control = _display displayCtrl _x;
            _control ctrlSetFade 0;
            _control ctrlCommit 0;
            _control ctrlSetFade 1;
            _control ctrlCommit 0.250;
        }
        forEach
        [
            4007,
            4003,
            4004,
            4005,
            4001,
            4010,
            4030,
            4020
        ];
        ExileClientXM8IsPowerOn = false;
    }
    else
    {
        ExileClientXM8NextPossiblePowerToggleTime = diag_tickTime + 1.5;
        _controlsToShow =         
        [
            4007,
            4003,
            4004,
            4005,
            4001
        ];
        if (ExileClientXM8IsMessageVisible) then { _controlsToShow pushBack 4010 };
        if (ExileClientXM8IsWarningVisible) then { _controlsToShow pushBack 4030 };
        if (ExileClientXM8IsConfirmVisible) then { _controlsToShow pushBack 4020 };
        playSound ["SndXM8PowerOn", true];
        {
            _control = _display displayCtrl _x;
            _control ctrlSetFade 1;
            _control ctrlCommit 0;
        }
        forEach _controlsToShow;
        _backgroundSplash = _display displayCtrl 4002;
        _backgroundSplash ctrlSetFade 1;
        _backgroundSplash ctrlShow true;
        _backgroundSplash ctrlSetPosition [0 * (0.025) + (0), -4 * (0.04) + (0)];
        _backgroundSplash ctrlCommit 0;
        _backgroundSplash ctrlSetFade 0;
        _backgroundSplash ctrlCommit 0.250;
        waitUntil {ctrlCommitted _backgroundSplash};
        {
            _control = _display displayCtrl _x;
            _control ctrlSetFade 0;
            _control ctrlCommit 0;
        }
        forEach _controlsToShow;
        uiSleep 1;
        _backgroundSplash ctrlSetFade 1;
        _backgroundSplash ctrlCommit 0.250;
        waitUntil {ctrlCommitted _backgroundSplash};
        _backgroundSplash ctrlShow false;
        _backgroundSplash ctrlSetPosition [-1, -1];
        ExileClientXM8IsPowerOn = true;
    };
};

Edited by ☜☆☞ mp4 ㋡ Sell GE, N1 & S1

Share this post


Link to post
Share on other sites

Add this to your init.sqf if you would like it to start turned on:

ExileClientXM8IsPowerOn = true;

 

Share this post


Link to post
Share on other sites
Advertisement

How do I get this to work, added the 

ExileClientXM8IsPowerOn = true;

But xm8 is still off when joining the server.

Share this post


Link to post
Share on other sites
23 hours ago, williamv1999 said:

How do I get this to work, added the 


ExileClientXM8IsPowerOn = true;

But xm8 is still off when joining the server.

Personally, it works for me, I have added it in init.sqf  now XM8 by pressing key 6, he is always on

example of my init.sqf  I added at the bottom ExileClientXM8IsPowerOn = true;

Spoiler

// Put this somewhere in your own init.sqf outside of any other brackets and if statements
if hasInterface then
{
    [] ExecVM "VEMFr_client\sqf\initClient.sqf"; // Client-side part of VEMFr
};

#include "A3XAI_Client\A3XAI_initclient.sqf";

ExileClientXM8IsPowerOn = true;

 

Share this post


Link to post
Share on other sites

I had to move it to the initPlayerlocal.sqf to get it to work, for some reason it didnt like the init.sqf... But it is working now. Thanks for your help

1 person likes this

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.