Jump to content
Sign in to follow this  
Twiznak

[SOLVED]Support calls lost after logout on dedicated server.

Recommended Posts

Hi, I am having a dedicated server issue where I , my character P_1, loses its support calls if I drop to the lobby or log out. The support requester module doesn't have an expression field, so I am lost. I have researched this issue and found a script that one would add to the init.sqf that transfers the support calls when a player teamswitches:

 

Spoiler

if (! isDedicated) then {
waitUntil {!isNull player};

TransferProviders = {

    _oldUnit = _this select 0;
    _oldProviders = _oldUnit getVariable ["BIS_SUPP_allProviderModules",[]];
    _HQ = _oldUnit getVariable ["BIS_SUPP_HQ",nil];

    if (isNil {player getVariable ["BIS_SUPP_HQ",nil]}) then {
        if ((count _oldProviders) > 0) then {
            {
                _providerModule = _x;
                {
                    if (typeOf _x == "SupportRequester" && _oldUnit in (synchronizedObjects _x)) then {
                        [player, _x, _providerModule] call BIS_fnc_addSupportLink;
                    };
                }forEach synchronizedObjects _providerModule;
            }forEach _oldProviders;
        };

        player setVariable ["BIS_SUPP_transmitting", false];
        player kbAddTopic ["BIS_SUPP_protocol", "A3\Modules_F\supports\kb\protocol.bikb", "A3\Modules_F\supports\kb\protocol.fsm", {call compile preprocessFileLineNumbers "A3\Modules_F\supports\kb\protocol.sqf"}];
        player setVariable ["BIS_SUPP_HQ", _HQ];
    };

    {
        _used = _oldUnit getVariable [format ["BIS_SUPP_used_%1",_x], 0];
        player setVariable [format ["BIS_SUPP_used_%1", _x], _used, true]
    } forEach [
        "Artillery",
        "CAS_Heli",
        "CAS_Bombing",
        "UAV",
        "Drop",
        "Transport"
    ];
};


_thread = [] spawn {
    _unit = player;
    while {true} do {
        waitUntil {_unit != player };
        hintSilent " Player has changed";
        [_unit] call TransferProviders;
        _unit = player;
    };
};

};

 

Am I on the right track with thinking this is a teamswitch/ transfer supports issue? Please help me.

Share this post


Link to post
Share on other sites
11 hours ago, B_Armaholic_Z_F said:

Am I on the right track with thinking this is a teamswitch/ transfer supports issue? Please help me.

Hi yes it is, thanks for your thread btw linking that thread, it works and solved my same issue but based on larrow's post:

https://forums.bohemia.net/forums/topic/144510-multiple-support-requesters/?do=findComment&comment=2591322

Copy that code to an init.sqf

Make sure all those who you want to have access to support is synced to the support requester module, when you die

and team switch the support will transfer to the new character unit you take over.

 

For the server only tho which this code at the start of his code --->    if (! isDedicated) then { waitUntil {!isNull player};

if your hosting the mission in MP lan which is local then you want to swap that code with this ----->  if (!(isServer)) then {waitUntil {!(isNull player)};

Share this post


Link to post
Share on other sites
2 hours ago, Gunter Severloh said:

Hi yes it is, thanks for your thread btw linking that thread, it works and solved my same issue but based on larrow's post:

https://forums.bohemia.net/forums/topic/144510-multiple-support-requesters/?do=findComment&comment=2591322

Copy that code to an init.sqf

Make sure all those who you want to have access to support is synced to the support requester module, when you die

and team switch the support will transfer to the new character unit you take over.

 

For the server only tho which this code at the start of his code --->    if (! isDedicated) then { waitUntil {!isNull player};

if your hosting the mission in MP lan which is local then you want to swap that code with this ----->  if (!(isServer)) then {waitUntil {!(isNull player)};

Hi thank you for helping. I have tried this in both the mission init.sqf and initServer.sqf and it's the same issue. 

Share this post


Link to post
Share on other sites

SOLVED  by none other than Davidoss , FOUR YEARS AGO. 

 

I just had to rephrase my google quarry, several times in frustration. Again, thank you Davidoss, you're a hero to me. 

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
Sign in to follow this  

×