Jump to content
M1ke_SK

Create Zeus module via script - assign to #adminLogged

Recommended Posts

I am trying to create zeus and assign it to current admin logged.

 

init.sqf

 

fnc_zeus = {
    
    {
        if (isNull (getAssignedCuratorUnit _x)) then {
            deleteVehicle _x;
        };
    } forEach allCurators;

    _curator = "curator" createVehicle [0,0,0];
    _curator addCuratorAddons activatedAddons;
    _this assignCurator _curator;

    _curator addCuratorEditableObjects [vehicles,true];
    _curator addCuratorEditableObjects [(allMissionObjects "Man"),false];
    _curator addCuratorEditableObjects [(allMissionObjects "Air"),true];
    _curator addCuratorEditableObjects [(allMissionObjects "Ammo"),false];

    _curator addEventHandler ["CuratorObjectRegistered", {
        _curator = _this select 0;
        _zeus = getAssignedCuratorUnit _curator;

        _uid = (getPlayerUID vehicle _zeus);
        _isAdmin = (serverCommandAvailable"#kick");

        if (!_isAdmin) then {
            unassignCurator _curator;
            deleteVehicle _curator;
        };
    }];
};

waitUntil {(!isNull Player) and (alive Player) and (player == player)};
[player,"fnc_zeus",false,false] call BIS_fnc_MP;

Here is what I want to create via script:

 

jxs6OLo.png

Share this post


Link to post
Share on other sites

I don't believe on the fly (aka scripted) game master modules are possible for security reasons, that may have changed, but last time I remember it was not possible (or I could be thinking about something else entirely :p).

  • Like 1

Share this post


Link to post
Share on other sites

@dedmen I found solution, already used it. Created module and assing curator to admin on start.

 

Thank you for help tho. :)

 

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

×