Jump to content

TheCloud

Member
  • Posts

    5
  • Joined

  • Last visited

Posts posted by TheCloud

  1. To fix the bug:  Error in expression <curvault getVariable "CharacterID";

    Change:

    for "_i" from 0 to _numvaults do {
    	_curvault = _allvaults select _i;
    	_curvaultcode = _curvault getVariable "CharacterID";
    	if (_curvaultcode == "0000" ) then {
    		_vaultarray = _vaultarray + [_curvault];
    		};
    };

    To:

    {
    _curvaultcode = (_x getVariable ["CharacterID","0"]);
        if (_curvaultcode == "0000" ) then {
            _vaultarray = _vaultarray + [_x];
            };
    } forEach (allmissionobjects "VaultStorageLocked");
    	
  2. UPDATE: I've got it working where admins can add a user as "friend" to the infostand. Then that user can add / remove vehicles etc as normal.  Which is pretty much how I wanted it to work. So that's that , great , job done :D

    -----

    I would like to set this up so that an admin spawns in a "Infostand_2_EP1" and then changes the ObjectUID to the players UID.  Without having to use P4L or PlotFriends etc.. I don't want the user to have to place down a plot pole, I want the admin to have to manually add the Infostand_2_EP1 then edit the database.  If I use the self actions code provided on the github and change it like below, the admins can access the garages and save vehicles etc, but adding friends to the garage doesn't save after restart and the user who's UID has been added to the ObjectUID still doesn't get the manage option.. any ideas ?

    20161015155213_1.jpg

    fvhi5j.jpg

     

    if ((_typeOfCursorTarget in DZE_Garage) && (speed player <= 1) && _canDo) then {
        private ["_garageowner","_garagefriends","_garageallowed","_friend"];
            _garageowner = _cursorTarget getVariable ["ObjectUID","0"]; //<-- We get the PUID of the owner. Here with P4L
            _friend = _cursorTarget getVariable ["GarageFriends",[]];
            _garagefriends = [];
    {
        _garagefriends set [count _garagefriends,(_x select 0)];
    } count _friend;
    _garageallowed = [_garageowner] + _garagefriends + AdminAndModList;
    	    if (s_player_garage < 0) then {
            if ((getPlayerUID player) in _garageallowed) then {
                s_player_garage =  player addAction ["<t color='#FFAA00'>Garage Menu</t>", "Garage\player_virtualgarage.sqf", _cursorTarget, 2, false];
            } else {
                s_player_garage = player addAction ["<t color='#FF0000'>Garage Locked</t>", "",_cursorTarget, 2, true, true, "", ""];   
            };
        };
    } else {
        player removeAction s_player_garage;
        s_player_garage = -1;       
    };
×
×
  • Create New...