Jump to content
  • 0

How to add a watermark to the bottom left corner of the screen


cy123888

Question

3 answers to this question

Recommended Posts

  • 0

Here you have it.
 
I'll try my best to explain the process.
 
You'll need to edit two files:
 init.sqf
 description.ext
 
on your init.sqf, at the top of the file, after the following line:

dayz_previousID = 0; 

add the following variable, set to whatever text you wish to appear on the lower-left corner of the screen:  (change "MyServer" to whatever you wish...)

server_name = "MyServer";

Then, at the very bottom of the init.sqf file (outside the server blocks), add the followind snippet of code:

	[] spawn {
		waitUntil {(!isNull Player) and (alive Player) and (player == player)};
		waituntil {!(isNull (findDisplay 46))};
		5 cutRsc ["wm_disp","PLAIN"];
		((uiNamespace getVariable "wm_disp") displayCtrl 1) ctrlSetText server_name;
	};

save you init.sqf file and, edit the next one (description.ext).
 
Then find the RscTitles class section, and paste the code below inside the RscTitles class.

	class wm_disp {
					idd = -1;
					onLoad = "uiNamespace setVariable ['wm_disp', _this select 0]";
					fadein = 0;
					fadeout = 0;
					duration = 10e10;
					controlsBackground[] = {};
					objects[] = {};
					class controls {
						class wm_text2 {
						idc = 1;
						x = safeZoneX+0.027;//safeZoneW*0.01;
						y = safeZoneY+safeZoneH-0.16;
						w = 1.151*safeZoneH;
						h = 0.057*safeZoneH;
						shadow = 2;
							class Attributes
								{
								font = "EtelkaNarrowMediumPro";
								color = "#24FFFFFF";
								align = "left"; // put "center" here if you want some background
								valign = "middle";
								shadow = 2;
								};
						colorBackground[] = { 1, 0.3, 0, 0 };  // uncomment and increase 4th number to have a background
						font = "EtelkaNarrowMediumPro";
						size = 0.05*safeZoneH;
						type = 13;
						style = 0;
						text="";
						};
					};
	};

**if you dont have a RscTitles section, create it and folow the previous step (below it's the needed lines to create the section):

***paste/create the RscTitles class section, before the RscText class section***

class RscTitles {
///////insert the wm_display code here***
};

Save the file, pack your mission and upload it.

That should sort you out.
 
Cheers.

Link to comment
Share on other sites

  • 0

Here you have it.

 

I'll try my best to explain the process.

 

You'll need to edit two files:

 init.sqf

 description.ext

 

on your init.sqf, at the top of the file, after the following line:

dayz_previousID = 0; 

add the following variable, set to whatever text you wish to appear on the lower-left corner of the screen:  (change "MyServer" to whatever you wish...)

server_name = "MyServer";

Then, at the very bottom of the init.sqf file (outside the server blocks), add the followind snippet of code:

	[] spawn {
		waitUntil {(!isNull Player) and (alive Player) and (player == player)};
		waituntil {!(isNull (findDisplay 46))};
		5 cutRsc ["wm_disp","PLAIN"];
		((uiNamespace getVariable "wm_disp") displayCtrl 1) ctrlSetText server_name;
	};

save you init.sqf file and, edit the next one (description.ext).

 

Then find the RscTitles class section, and paste the code below inside the RscTitles class.

	class wm_disp {
					idd = -1;
					onLoad = "uiNamespace setVariable ['wm_disp', _this select 0]";
					fadein = 0;
					fadeout = 0;
					duration = 10e10;
					controlsBackground[] = {};
					objects[] = {};
					class controls {
						class wm_text2 {
						idc = 1;
						x = safeZoneX+0.027;//safeZoneW*0.01;
						y = safeZoneY+safeZoneH-0.16;
						w = 1.151*safeZoneH;
						h = 0.057*safeZoneH;
						shadow = 2;
							class Attributes
								{
								font = "EtelkaNarrowMediumPro";
								color = "#24FFFFFF";
								align = "left"; // put "center" here if you want some background
								valign = "middle";
								shadow = 2;
								};
						colorBackground[] = { 1, 0.3, 0, 0 };  // uncomment and increase 4th number to have a background
						font = "EtelkaNarrowMediumPro";
						size = 0.05*safeZoneH;
						type = 13;
						style = 0;
						text="";
						};
					};
	};

**if you dont have a RscTitles section, create it and folow the previous step (below it's the needed lines to create the section):

***paste/create the RscTitles class section, before the RscText class section***

class RscTitles {
///////insert the wm_display code here***
};

Save the file, pack your mission and upload it.

That should sort you out.

 

Cheers.

Thank

Link to comment
Share on other sites

  • 0

Hey Newbie, 

 

I tried this code and it had me stuck on the 'Waiting for Host' Screen. 

 

I input the code exactly like you stated, looked it over a few times, but didn't see anything wrong. 

 

What did you mean by 'outside the server blocks'?

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...