Jump to content
  • 0

BEC


Cedricolp

Question

Hello it's me again :p, 

I need help with BEC .. so i try to make scheduler and for this i need to have BEC working on my server 

So i read some topics here , and i try dunno how much time to let him run .. no results 

Here is my Arma3server root folder

  41973644303e5db86d4459b8a14afec179cca2.j

Like you can see , i have the battleye folder and the BEC folder , but in the TADST i have a other battleye folder (i'm using TADST to lauch the server)

in the config from the BEC folder i set the PATH to my battleye folder into the Arma3 root folder 

but nothing works.. battleye is working to conect with the Rcon but not with all the rest..

i try to lauch the BEC.EXE , i got the message "waiting for the server starting up" when the server start i got the message " Looking for a update" and then BEC disapear ..

can here someone say me the exact install guide to let work BEC with TADST and that the scheduler work to ? 

maybe i'm wrong for the install ! .. so if you guyz can show me the exact install steps i will try it again 

 

Thank you verry much all of you

Link to comment
Share on other sites

24 answers to this question

Recommended Posts

  • 1

I assume that you use windows for your A3 Epoch server:

Then you just create a batch file called "whateveruwant.bat" in you A3 server root directory or wherever you want, and copy and paste this in. Of course you have to edit it for your needs:

@echo off
cls

set wat=Arma3 Epoch

title %wat% Watchdog

:watchdog
echo (%time%) %wat% started.

cd E:\Games\Arma3\A3Epoch\DB
START redis-server.exe redis.conf

cd E:\Games\Arma3\A3Epoch\
start "Epoch"  /high arma3server.exe -enableHT -mod=@Epoch; -serverMod=@EpochHive; -config=E:\Games\Arma3\A3Epoch\sc\server.cfg -port=2323 -profiles=SC -cfg=E:\Games\Arma3\A3Epoch\sc\basic.cfg -name=SC -autoinit

Timeout /t 14400

taskkill /F /IM arma3server.exe

Timeout /t 5

echo (%time%) %wat% closed or crashed, restarting.
cls
goto watchdog


14400 seconds / 60  = 240 minutes / 60 = 4 hours restart cycle

Link to comment
Share on other sites

  • 1

i gave you everything what you need but i dont write the code for you as i did already for the batch file.

Search the web how to init a arma3 variable and the dif between local and global variables. There are a lot of tutorials.

It will help you to understand those things.

Link to comment
Share on other sites

  • 0

So nobody can help me for ce BEC install ? 

battleye is working i can connect with the rcon . but alle what works with BEC like scheduler / Admins ect .. is not working

When i launch the Bec.exe is wiating for a server conection

then when the server is on he is looking for update , after 1 min he just disepear ...

 

 

Link to comment
Share on other sites

  • 0
1 hour ago, rvg?! said:

I dont use BEC, but if you just want to kill/restart your arma 3 task you could use a simple batch file or firedeamon.

Also you could read diag_ticktime/serverTime and popup messages whenever you want.

Oh okey , can you help me with this ? sorry i'm pretty new in this :(

Link to comment
Share on other sites

  • 0

OK, 

i think i'm wrong but, where can i put what you write before ? 

i didn't see the countdown

 

Spoiler

waitUntil {!(isNull (findDisplay 46))};
disableSerialization;

    _rscLayer = "statusBar" call BIS_fnc_rscLayer;
    _rscLayer cutRsc["statusBar","PLAIN"];
    systemChat format["Loading Player info...", _rscLayer];
    [] spawn 
    {

        sleep 5;
        //set the color values.
        //Additional color codes can be found here: http://html-color-codes.com/
        _colourDefault  = parseText "#ADADAD"; //set your default colour here
        _colour100         = parseText "#336600";
        _colour90         = parseText "#339900";
        _colour80         = parseText "#33CC00";
        _colour70         = parseText "#33FF00";
        _colour60         = parseText "#66FF00";
        _colour50         = parseText "#CCFF00";
        _colour40         = parseText "#CCCC00";
        _colour30         = parseText "#CC9900";
        _colour20         = parseText "#CC6600";
        _colour10         = parseText "#CC3300";
        _colour0         = parseText "#CC0000";
        _colourDead     = parseText "#000000";
            
    
    while {true} do 
    {
        sleep 1;
                
        //moved the creation of the status bar inside the loop and create it if it is null,
        //this is to handle instance where the status bar is disappearing 
        if(isNull ((uiNamespace getVariable "statusBar")displayCtrl 55555)) then
        {
            diag_log "statusbar is null create";
            disableSerialization;
            _rscLayer = "statusBar" call BIS_fnc_rscLayer;
            _rscLayer cutRsc["statusBar","PLAIN"];
        };        
        
        //initialize variables and set values
        _unit = _this select 0;
        _damage = round ((1 - (damage player)) * 100);
        //_damage = (round(_damage * 100));
        _hunger = round((EPOCH_playerHunger/5000) * 100);
        _thirst = round((EPOCH_playerThirst/2500) * 100);
        _wallet = EPOCH_playerCrypto;
        _stamina = round(EPOCH_playerStamina * 100) / 100;
        _toxPercent = round (EPOCH_playerToxicity);
        _energy = round(EPOCH_playerEnergy);
        _energyPercent =  floor((_energy / 2500 ) * 100);
        _fps = format["%1", diag_fps];
        _grid = mapGridPosition  player; 
        _xx = (format[_grid]) select  [0,3]; 
        _yy = (format[_grid]) select  [3,3];  
        _time = (round(240-(serverTime)/60));  //edit the '240' value (60*4=240) to change the countdown timer if your server restarts are shorter or longer than 4 hour intervals
        _hours = (floor(_time/60));
        _minutes = (_time - (_hours * 60));
        _players = (count playableUnits -1);
        
        
        switch(_minutes) do    {
            case 9: {_minutes = "09"};
            case 8: {_minutes = "08"};
            case 7: {_minutes = "07"};
            case 6: {_minutes = "06"};
            case 5: {_minutes = "05"};
            case 4: {_minutes = "04"};
            case 3: {_minutes = "03"};
            case 2: {_minutes = "02"};
            case 1: {_minutes = "01"};
            case 0: {_minutes = "00"};
        };
                        
        
        //Colour coding
        //Damage
        _colourDamage = _colourDefault;
        
        switch true do {
            case(_damage >= 100) : {_colourDamage = _colour100;};
            case((_damage >= 90) && (_damage < 100)) : {_colourDamage =  _colour90;};
            case((_damage >= 80) && (_damage < 90)) : {_colourDamage =  _colour80;};
            case((_damage >= 70) && (_damage < 80)) : {_colourDamage =  _colour70;};
            case((_damage >= 60) && (_damage < 70)) : {_colourDamage =  _colour60;};
            case((_damage >= 50) && (_damage < 60)) : {_colourDamage =  _colour50;};
            case((_damage >= 40) && (_damage < 50)) : {_colourDamage =  _colour40;};
            case((_damage >= 30) && (_damage < 40)) : {_colourDamage =  _colour30;};
            case((_damage >= 20) && (_damage < 30)) : {_colourDamage =  _colour20;};
            case((_damage >= 10) && (_damage < 20)) : {_colourDamage =  _colour10;};
            case((_damage >= 1) && (_damage < 10)) : {_colourDamage =  _colour0;};
            case(_damage < 1) : {_colourDamage =  _colourDead;};
        };
        
        //Hunger
        _colourHunger = _colourDefault;
        switch true do {
            case(_hunger >= 100) : {_colourHunger = _colour100;};
            case((_hunger >= 90) && (_hunger < 100)) :  {_colourHunger =  _colour90;};
            case((_hunger >= 80) && (_hunger < 90)) :  {_colourHunger =  _colour80;};
            case((_hunger >= 70) && (_hunger < 80)) :  {_colourHunger =  _colour70;};
            case((_hunger >= 60) && (_hunger < 70)) :  {_colourHunger =  _colour60;};
            case((_hunger >= 50) && (_hunger < 60)) :  {_colourHunger =  _colour50;};
            case((_hunger >= 40) && (_hunger < 50)) :  {_colourHunger =  _colour40;};
            case((_hunger >= 30) && (_hunger < 40)) :  {_colourHunger =  _colour30;};
            case((_hunger >= 20) && (_hunger < 30)) :  {_colourHunger =  _colour20;};
            case((_hunger >= 10) && (_hunger < 20)) :  {_colourHunger =  _colour10;};
            case((_hunger >= 1) && (_hunger < 10)) :  {_colourHunger =  _colour0;};
            case(_hunger < 1) : {_colourHunger =  _colourDead;};
        };
        
        //Thirst
        _colourThirst = _colourDefault;        
        switch true do{
        
            case(_thirst >= 100) : {_colourThirst = _colour100;};
            case((_thirst >= 90) && (_thirst < 100)) :  {_colourThirst =  _colour90;};
            case((_thirst >= 80) && (_thirst < 90)) :  {_colourThirst =  _colour80;};
            case((_thirst >= 70) && (_thirst < 80)) :  {_colourThirst =  _colour70;};
            case((_thirst >= 60) && (_thirst < 70)) :  {_colourThirst =  _colour60;};
            case((_thirst >= 50) && (_thirst < 60)) :  {_colourThirst =  _colour50;};
            case((_thirst >= 40) && (_thirst < 50)) :  {_colourThirst =  _colour40;};
            case((_thirst >= 30) && (_thirst < 40)) :  {_colourThirst =  _colour30;};
            case((_thirst >= 20) && (_thirst < 30)) :  {_colourThirst =  _colour20;};
            case((_thirst >= 10) && (_thirst < 20)) :  {_colourThirst =  _colour10;};
            case((_thirst >= 1) && (_thirst < 10)) :  {_colourThirst =  _colour0;};
            case(_thirst < 1) : {_colourThirst =  _colourDead;};
        };
        
        //Energy
        _colourEnergy = _colourDefault;
        switch true do{
        
            case(_energyPercent >= 100) : {_colourEnergy = _colour100;};
            case((_energyPercent >= 90) && (_energyPercent < 100)) :  {_colourEnergy =  _colour90;};
            case((_energyPercent >= 80) && (_energyPercent < 90)) :  {_colourEnergy =  _colour80;};
            case((_energyPercent >= 70) && (_energyPercent < 80)) :  {_colourEnergy =  _colour70;};
            case((_energyPercent >= 60) && (_energyPercent < 70)) :  {_colourEnergy =  _colour60;};
            case((_energyPercent >= 50) && (_energyPercent < 60)) :  {_colourEnergy =  _colour50;};
            case((_energyPercent >= 40) && (_energyPercent < 50)) :  {_colourEnergy =  _colour40;};
            case((_energyPercent >= 30) && (_energyPercent < 40)) :  {_colourEnergy =  _colour30;};
            case((_energyPercent >= 20) && (_energyPercent < 30)) :  {_colourEnergy =  _colour20;};
            case((_energyPercent >= 10) && (_energyPercent < 20)) :  {_colourEnergy =  _colour10;};
            case((_energyPercent >= 1) && (_energyPercent < 10)) :  {_colourEnergy =  _colour0;};
            case(_energyPercent < 1) : {_colourEnergy =  _colour0;};
        };
        
        //Toxicity
        _colourToxicity = _colourDefault;
        switch true do{
            case(_toxPercent >= 100) : {_colourToxicity = _colourDead;};
            case((_toxPercent >= 90) && (_toxPercent < 100)) :  {_colourToxicity =  _colour0;};
            case((_toxPercent >= 80) && (_toxPercent < 90)) :  {_colourToxicity =  _colour10;};
            case((_toxPercent >= 70) && (_toxPercent < 80)) :  {_colourToxicity =  _colour20;};
            case((_toxPercent >= 60) && (_toxPercent < 70)) :  {_colourToxicity =  _colour30;};
            case((_toxPercent >= 50) && (_toxPercent < 60)) :  {_colourToxicity =  _colour40;};
            case((_toxPercent >= 40) && (_toxPercent < 50)) :  {_colourToxicity =  _colour50;};
            case((_toxPercent >= 30) && (_toxPercent < 40)) :  {_colourToxicity =  _colour60;};
            case((_toxPercent >= 20) && (_toxPercent < 30)) :  {_colourToxicity =  _colour70;};
            case((_toxPercent >= 10) && (_toxPercent < 20)) :  {_colourToxicity =  _colour80;};
            case((_toxPercent >= 1) && (_toxPercent < 10)) :  {_colourToxicity =  _colour90;};
            case(_toxPercent < 1) : {_colourToxicity =  _colour100;};
        };
        
        //Stamina
        _colourStamina = _colourDefault;
        
        //display the information 
        ((uiNamespace getVariable "statusBar")displayCtrl 55555)ctrlSetStructuredText parseText 
            format["
            <t shadow='1' shadowColor='#000000' color='%10'><img size='1.6'  shadowColor='#000000' image='addons\status_bar\images\players.paa' color='%10'/> %2</t>
            <t shadow='1' shadowColor='#000000' color='%11'><img size='1.6'  shadowColor='#000000' image='addons\status_bar\images\damage.paa' color='%11'/> %3%1</t> 
            <t shadow='1' shadowColor='#000000' color='%10'><img size='1.6'  shadowColor='#000000' image='addons\status_bar\images\krypto.paa' color='%10'/> %4</t> 
            <t shadow='1' shadowColor='#000000' color='%12'><img size='1.6'  shadowColor='#000000' image='addons\status_bar\images\hunger.paa' color='%12'/> %5%1</t> 
            <t shadow='1' shadowColor='#000000' color='%13'><img size='1.6'  shadowColor='#000000' image='addons\status_bar\images\thirst.paa' color='%13'/> %6%1</t> 
            <t shadow='1' shadowColor='#000000' color='%15'><img size='1.6'  shadowColor='#000000' image='addons\status_bar\images\stamina.paa' color='%15'/>%9</t>
            <t shadow='1' shadowColor='#000000' color='%19'><img size='1.6'  shadowColor='#000000' image='addons\status_bar\images\toxicity.paa' color='%19'/>%20</t>
            <t shadow='1' shadowColor='#000000' color='%14'><img size='1.6'  shadowColor='#000000' image='addons\status_bar\images\energy.paa' color='%14'/>%8%1</t> 
            <t shadow='1' shadowColor='#000000' color='%10'>FPS: %7</t>
            <t shadow='1' shadowColor='#000000' color='%10'>GRIDREF: %16</t>
            <t shadow='1' shadowColor='#000000' color='%10'><img size='1.6'  shadowColor='#000000' image='addons\status_bar\images\restart.paa' color='%10'/>%17:%18</t>",
                    "%", 
                    _players,
                    _damage,
                    _wallet, 
                    _hunger, 
                    _thirst, 
                    round diag_fps, 
                    _energyPercent, 
                    _stamina,
                    _colourDefault,
                    _colourDamage,
                    _colourHunger,
                    _colourThirst,
                    _colourEnergy,
                    _colourStamina,
                    format["%1/%2",_xx,_yy],
                    _hours,
                    _minutes,
                    _colourToxicity,
                    _toxPercent
                    
                ];
        
        
                
            
    }; 
};

Realy sorry for the disturb

Link to comment
Share on other sites

  • 0

Oh 

Can i do this ? 

_players = (count playableUnits -1);

 if (_hours == 0 && _minutes == 30) then {systemChat "Server Restart in 30 minutes"};

if (_hours == 0 && _minutes == 20) then {systemChat "Server Restart in 20 minutes"};

if (_hours == 0 && _minutes == 10) then {systemChat "Server Restart in 10 minutes"};

if (_hours == 0 && _minutes == 05) then {systemChat "Server Restart in 5 minutes"};

if (_hours == 0 && _minutes == 01) then {systemChat "Server Restart in 1 minutes"};

 

and what i need to do that the message juste show it 1 time and not every 60 second like you say ?

 

Link to comment
Share on other sites

  • 0

Ok like this then ! 

Spoiler

_players = (count playableUnits -1);

 if (_hours == 0 && _minutes == 30) then {systemChat "Server Restart in 30 minutes"};

if (_hours == 0 && _minutes == 20) then {systemChat "Server Restart in 20 minutes"};

if (_hours == 0 && _minutes == 10) then {systemChat "Server Restart in 10 minutes"};

if (_hours == 0 && _minutes == 5) then {systemChat "Server Restart in 5 minutes"};

if (_hours == 0 && _minutes == 1) then {systemChat "Server Restart in 1 minute"};

And now the repeat time ... i never did this before

so after if (_hours == 0 && _minutes == 1) then {systemChat "Server Restart in 1 minute"},1,true; ???

to repeat 1 time ?

 

 

Link to comment
Share on other sites

  • 0

It's a bit dificult for a newbi like me :) you are my jedi :)

so for the playestatusbat its ok like this

Spoiler

        if (_hours == 0 && _minutes == 30) then {systemChat "Server Restart in 30 minutes"};
        if (_hours == 0 && _minutes == 20) then {systemChat "Server Restart in 20 minutes"};
        if (_hours == 0 && _minutes == 10) then {systemChat "Server Restart in 10 minutes"};
        if (_hours == 0 && _minutes == 5) then {systemChat "Server Restart in 5 minutes"};
        if (_hours == 0 && _minutes == 1) then {systemChat "Server Restart in 1 minutes"};

Now i need to go into the init.statusbar.sqf to set a variable for the repeat message ? 

Spoiler

waitUntil {!isNuLL(uiNameSpace getVariable ["EPOCH_loadingScreen",displayNull])};
waitUntil {isNuLL(uiNameSpace getVariable ["EPOCH_loadingScreen",displayNull])};
waitUntil {!isNull player};
waitUntil {!(isNull (findDisplay 46))};

//Status Bar Config and Startup Options

//Choose Options
//--------------------------------------------------------------------------------------------------------------------------------------        
_WSC = false;  //Option whether to use and display world space coords in the admin status bar (true or false)


_sb_admin_list = ["76561197981218019","76561198093587690","76561198180739080"];    
//--------------------------------------------------------------------------------------------------------------------------------------

//Start the Status Bar
    
if ((getPlayerUID player) in _sb_admin_list) then  //admins id here

    if (_WSC) then
    {
        [] execVM "addons\status_bar\adminbar_ws.sqf";
    }
    else
    {
        [] execVM "addons\status_bar\adminbar.sqf";
    };

else 
{
    [] execVM "addons\status_bar\PlayerBar.sqf";
};

Thats my init , where can i put it and can you pleas say me if i'm good for the moment ? 

and can you give me the variable to set ? 

like i say i learn a bit with you now and i will thank you for this again !

Link to comment
Share on other sites

  • 0

Sorry for the late answere..  I falling asleep..  

So, im sorry but I'm really booby in this 

[_halfanhour] execvm "playerbar.sqf"; is this the real code for the 30 min repeat message ? 

Sorry if I disturbe you..  

Can you say me if I'm wrong in the first code statusbar.sqf..  The code like this will work ?

And if you can help me for the ini repeat message so I can save this and try it.. 

Really sorry about that.. But you help me so much. 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...