Jump to content

Virtual Garage with P4L and Plotmanage


L3gendaer

Recommended Posts

  • 2 weeks later...

I have this fully working but with a small issue. The garage option keeps flashing making it almost impossible to select. Anyone able to help with this?

Here is the garage part in my self actions, I had to edit it a little bit to get garage menu to show up instead of garage locked.

private ["_garageowner","_garagefriends","_garageallowed","_friend"];
if((_typeOfCursorTarget in DZE_Garage) && (speed player <= 1) && _canDo) then {
    if (s_player_garage < 0) then {
    _garageowner = _cursorTarget getVariable ["ownerPUID","0"];
    _friend = _cursorTarget getVariable ["garagefriends",[]];
    _garagefriends = [];
    {
        _garagefriends set [count _garagefriends,(_x select 0)];
    } count _friend;
    _garageallowed = [_garageowner] + _garagefriends;
    if((getPlayerUID player) in _garageallowed) then {
        s_player_garage = player addAction ["<t color='#FFAA00'>Garage Menu</t>", "custom\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;
    };
};

Edited by orionjade
Link to comment
Share on other sites

I have this fully working but with a small issue. The garage option keeps flashing making it almost impossible to select. Anyone able to help with this?

Here is the garage part in my self actions, I had to edit it a little bit to get garage menu to show up instead of garage locked.

 

Hidden Content

did you do the infistar dialog thing?

Link to comment
Share on other sites

Yes I added 50003 and 50004 to infistar.

I should be a little more clear. I'm referring to the garage menu option keeps flashing. If you are able to catch it the dialog opens just fine. I just need to get the garage menu option to not flash in the action menu on the left side of the screen.

Link to comment
Share on other sites

I use plotmanagement to let people have acces to the garage .

Besides that i put in a part that people cant acces the garage if anyone else is closer then 10m because there is a duping problem with the garage you can spawn the same vehicle twice if 2 players spawn it at the same time .

Using plotmanagement makes the garage usage so much more easy .

 

 

Link to comment
Share on other sites

  • 3 weeks later...

Care to share?

There is also a dupe bug that if you spam the spawn button you can spawn in a bunch of the same vehicle, I found this out when I was testing the script on my test server.

Sure i can share but it can also be found on the forums how to .

If you use p4l ,doormanage or plotmanagement you also need to adjust  server_updateObject.sqf

This is the part i use in fn_selfactions

_playersNear = {isPlayer _x} count (player nearEntities ["CAManBase", 10]);
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 && (_playersNear <= 1)) then 
			{
				s_player_garage =  player addAction ["Garage Menu","MrX\functions\Garage\player_virtualgarage.sqf",_cursorTarget,2,false];
			} 
			else 
			{
				cutText ["You are not on the plot or another player is to close.","PLAIN DOWN"];
			};
		};
	} 
	else 
	{
		player removeAction s_player_garage;
		s_player_garage = -1;        
	};
}
else
{
	player removeAction s_player_garage;
	s_player_garage = -1;   
}; 

 

This gives everyone on the plotpole acces to the garage just as long as nobody else is to close .

You also need something to allow your players to deploy a garage and a form of helipad , i suggest deploy anything and dont forget to add the garage and helipad to the maintainclasses .

If you have any questions just let me know .

Edited by creativv
Link to comment
Share on other sites

  • 2 weeks later...

I can help you guys install P4l + Virtual Garage + Plot / Door Management. just go to my website @ stealthgamers.net to get ts info and ill help anyone that comes.

do you know if this will work on a Cherno map run by Gtx gaming if so can you help me please I'm kinda new at this and don't know where too start. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...