Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private ["_garageowner","_garagefriends","_garageallowed","_friend"];
- _garageowner = _cursorTarget getVariable ["ownerPUID","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 = [_owner] + _garagefriends;
- if ((_typeOfCursorTarget in DZE_Garage) && (speed player <= 1) && _canDo) then {
- 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;
- };
- ////////////////////////////////////// REPLACE THIS CODE WITH THIS ONE //////////////////////////////////////////////////////////////////
- private ["_nearestPoles","_pole","_garagefriends","_garageallowed","_friends"];
- _nearestPoles = nearestObjects [(vehicle player),["Plastic_Pole_EP1_DZ"],(DZE_PlotPole select 0)];
- if (count _nearestPoles > 0) then
- {
- _pole = _nearestPoles select 0;
- _friends = _pole getVariable ["plotfriends",[]];
- _owner = _pole getVariable ["ownerPUID","0"];
- _garagefriends = [];
- {
- _garagefriends set [_forEachIndex,(_x select 0)];
- } forEach _friends;
- _garageallowed = _garagefriends + [_owner];
- if ((_typeOfCursorTarget in DZE_Garage) && (speed player <= 1) && _canDo) then
- {
- 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;
- };
- }
- else
- {
- player removeAction s_player_garage;
- s_player_garage = -1;
- };
- ///////////////////////////////////////////////// ROUND ABOUT LINE 225.....ISH///////////////////////////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement