Jump to content

[Tutorial] New Spawn & Garage Menus


Prophet
 Share

Recommended Posts

Creator: Not sure to be honest, let's just say ClassifiedReborn

EDIT: Creator was actually Trailerpark/Repentz.

@Repentz For Credit.

 

Garage Menu Tutorial:

1. Replace your impound.hpp with:

class Life_impound_menu
{
	idd = 2800;
	name="life_vehicle_shop";
	movingEnable = 0;
	enableSimulation = 1;
	onLoad = "ctrlShow [2330,false];";

	class controlsBackground {
		class InventoryBack:Life_RscPicture {
			text = "textures\UI\back_garage.paa";
			idc = -1;
			x = 0.0978125 * safezoneW + safezoneX;
			y = -0.05 * safezoneH + safezoneY;
			w = 0.825 * safezoneW;
			h = 1.1 * safezoneH;
		};
	};

	class controls
	{

		class CloseBtn : Life_RscButtonMenu
		{
			idc = -1;
			onButtonClick = "closeDialog 0;";
			x = 0.29375 * safezoneW + safezoneX;
			y = 0.313 * safezoneH + safezoneY;
			w = 0.020625 * safezoneW;
			h = 0.022 * safezoneH;
			tooltip = "$STR_Global_Close";

			colorBackground[] = {0,0,0,0};
			colorBackgroundFocused[] = {0,0,0,0};
			colorBackground2[] = {0,0,0,0};
			color[] = {1,1,1,1};
			colorFocused[] = {0,0,0,0};
			color2[] = {0,0,0,0};
			colorText[] = {1,1,1,1};
		};
		
		class RentCar : Life_RscButtonMenu
		{
			idc = -1;
			onButtonClick = "[] call life_fnc_unimpound;";
			x = 0.295812 * safezoneW + safezoneX;
			y = 0.72275 * safezoneH + safezoneY;
			w = 0.134062 * safezoneW;
			h = 0.03245 * safezoneH;
			tooltip = "$STR_Global_Retrieve";

			colorBackground[] = {0,0,0,0};
			colorBackgroundFocused[] = {0,0,0,0};
			colorBackground2[] = {0,0,0,0};
			color[] = {1,1,1,1};
			colorFocused[] = {0,0,0,0};
			color2[] = {0,0,0,0};
			colorText[] = {1,1,1,1};
		};

		class BuyCar : life_RscButtonMenu
		{
			idc = -1;
			onButtonClick = "[] call life_fnc_sellGarage; closeDialog 0;";
			x = 0.445138 * safezoneW + safezoneX;
			y = 0.72275 * safezoneH + safezoneY;
			w = 0.134062 * safezoneW;
			h = 0.03245 * safezoneH;
			tooltip = "$STR_Global_Sell";

			colorBackground[] = {0,0,0,0};
			colorBackgroundFocused[] = {0,0,0,0};
			colorBackground2[] = {0,0,0,0};
			color[] = {1,1,1,1};
			colorFocused[] = {0,0,0,0};
			color2[] = {0,0,0,0};
			colorText[] = {1,1,1,1};
		};
		class VehicleList : Life_RscListBox
		{
			idc = 2802;
			text = "";
			sizeEx = 0.04;
			colorBackground[] = {0,0,0,0};
			onLBSelChanged = "_this call life_fnc_garageLBChange;";

			x = 0.298906 * safezoneW + safezoneX;
			y = 0.368 * safezoneH + safezoneY;
			w = 0.165 * safezoneW;
			h = 0.33 * safezoneH;
		};

		class vehicleInfomationList : Life_RscStructuredText
		{
			idc = 2803;
			text = "";
			sizeEx = 0.035;
			colorBackground[] = {0,0,0,0};

			x = 0.479375 * safezoneW + safezoneX;
			y = 0.368 * safezoneH + safezoneY;
			w = 0.2475 * safezoneW;
			h = 0.33 * safezoneH;
		};

		class MainHideText : Life_RscText
		{
			idc = 2811;
			text = "$STR_ANOTF_QueryGarage";
			x = 0.298906 * safezoneW + safezoneX;
			y = 0.5 * safezoneH + safezoneY;
			w = 0.170156 * safezoneW;
			h = 0.022 * safezoneH;
		};
	};
};

 

2. Make a new UI folder in your textures, and put back_garage.paa in it.

 

 

 

Spawn Menu:

1. Replace your spawnSelection.hpp with:

class life_spawn_selection
{
 idd = 38500;
 movingEnabled = 0;
 enableSimulation = 1;

 class controlsBackground
 {
	class BGha: Life_RscPicture
	{
		idc = 38531;
		text = "textures\UI\bg.jpg";
		x = 0 * safezoneW + safezoneX;
		y = 0 * safezoneH + safezoneY;
		w = 1 * safezoneW;
		h = 1 * safezoneH;
	};
	class BGMenu: Life_RscPicture
	{
		idc = 38531;
		text = "textures\UI\back_spawn.paa";
		x = 0.190625 * safezoneW + safezoneX;
		y = 0.093 * safezoneH + safezoneY;
		w = 0.629062 * safezoneW;
		h = 0.792 * safezoneH;
	};

    class MapView : Life_RscMapControl
    {
		idc = 38502;
		colorBackground[] = {0,0,0,0.7};
		x = 0.37625 * safezoneW + safezoneX;
		y = 0.324 * safezoneH + safezoneY;
		w = 0.376406 * safezoneW;
		h = 0.418 * safezoneH;
		maxSatelliteAlpha = 0.75;//0.75;
		alphaFadeStartScale = 1.15;//0.15;
		alphaFadeEndScale = 1.29;//0.29;
    };
};

 class controls
 {
  class SpawnPointList: Life_RscListNBox
  {
   idc = 38510;
   text = "";
   sizeEx = 0.041;
   coloumns[] = {0,0,0.9};
   drawSideArrows = 0;
   idcLeft = -1;
   idcRight = -1;
   rowHeight = 0.050;
	x = 0.247344 * safezoneW + safezoneX;
	y = 0.324 * safezoneH + safezoneY;
	w = 0.12375 * safezoneW;
	h = 0.374 * safezoneH;
   onLBSelChanged = "_this call life_fnc_spawnPointSelected;";
  };

  class spawnButton : Life_RscButtonMenu
  {
   idc = -1;
   type = 1;
   style = "0x02";
   colorBackground[] = {0.03,0.55,0.95,1};
   text = "Spawn";
   onButtonClick = "[] call life_fnc_spawnConfirm";
	x = 0.247344 * safezoneW + safezoneX;
	y = 0.709 * safezoneH + safezoneY;
	w = 0.12375 * safezoneW;
	h = 0.033 * safezoneH;
   colorBackgroundActive[] = {0.06,0.32,0.96,1};
   colorBackgroundDisabled[] = {0.95,0.95,0.95,0};
   offsetX = 0.003;
   offsetY = 0.003;
   offsetPressedX = 0.002;
   offsetPressedY = 0.002;
   colorShadow[] = {0,0,0,1};
   colorBorder[] = {0,0,0,0};
   borderSize = 0.008;
  };
  /*
  class LastPos : Life_RscButtonMenu
  {
   idc = 1001;
   type = 1;
   style = "0x02";
   colorBackground[] = {0,1,0,0.5};
   text = "Letzte Position";
   onButtonClick = "[] call life_fnc_spawnLast";
   x = 0.247344 * safezoneW + safezoneX;
	y = 0.665 * safezoneH + safezoneY;
	w = 0.12375 * safezoneW;
	h = 0.033 * safezoneH;
   colorBackgroundActive[] = {0,1,0,0.7};
   colorBackgroundDisabled[] = {0.95,0.95,0.95,0};
   offsetX = 0.003;
   offsetY = 0.003;
   offsetPressedX = 0.002;
   offsetPressedY = 0.002;
   colorShadow[] = {0,0,0,1};
   colorBorder[] = {0,0,0,0};
   borderSize = 0.008;
  };*/
 };
};

Then make (or if you have one) a UI folder and put back_spawn.paa in there.

You want to find a random picture from google and put it in your UI folder and name it bg.jpg. If you don't have a picture I will provide you with one. I can't post links to images here, I will use a external source. bg.jpg

 

Screenshots: (Thanks too @Dave650 for these)

need1.PNG.1529b765c6c53afaab3780a47b15de50.PNG.ce7d554b15166f1d155fa44821109847.PNG

need2.PNG.1804d921bc670dc539d5ec8831171c18.PNG.0a1259b9d514f5726a23c7dc0bd648ad.PNG

 

Edited by Prophet
  • Like 3
Link to comment
Share on other sites

Though these images/menus were in the server I created, and I did extensive editing to them, I did not create some of the original UI layouts/ images. For example the background of the spawn menu was created by me, the spawn menu itself was heavily edited by me, but the original came from someone else, I think the mission I created was given away by the people who took over after I left kinda idea. 

Link to comment
Share on other sites

38 minutes ago, Repentz said:

Though these images/menus were in the server I created, and I did extensive editing to them, I did not create some of the original UI layouts/ images. For example the background of the spawn menu was created by me, the spawn menu itself was heavily edited by me, but the original came from someone else, I think the mission I created was given away by the people who took over after I left kinda idea. 

I did post these from the Trailerpark mission file which was publicly released. I thought I would release these in light that they do look nice, and I gave credit. If you would prefer, I or you can take down the thread I don't mind, I released because it looks nice.

Edited by Prophet
Link to comment
Share on other sites

3 minutes ago, Prophet said:

I did post these from the Trailerpark mission file which was publicly released. I thought I would release these in light that they do look nice, and I gave credit.

Thing is, although the server was called the trailerpark, the only person who developed the mission was myself, once I left I heard things went downhill and I guess they decided to give the mission away, I never told them not to so I guess it's my own fault

Link to comment
Share on other sites

1 minute ago, Repentz said:

Thing is, although the server was called the trailerpark, the only person who developed the mission was myself, once I left I heard things went downhill and I guess they decided to give the mission away, I never told them not to so I guess it's my own fault/

If you want it down I don't mind I will gladly take it down. I apologize for not asking, I was not sure who the actual creator was. If I knew I would have asked.

Edited by Prophet
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.