Jump to content

[extended_climatology]


juandayz

Recommended Posts

The effect looks very cool, thanks for releasing. Just a quick question from my side.

Why are you transfering the whole publicEH.sqf to the client? Just make your new EventHandler in a custom file. This way, you decrease your mission file size.
So instead of replacing this line:

call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\publicEH.sqf";

Just put the custom one below it so it looks like this:

call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\publicEH.sqf";
call compile preprocessFileLineNumbers "dayz_code\init\publicEH.sqf";				//or another custom path, whatever

And then just put this single publicEH in there like this (publicEH.sqf):

if (!isDedicated) then {
	"sandstorm"                  addPublicVariableEventHandler {(_this select 1) execVM "sandstorm\player_sandstorm.sqf"};
};

That's the whole file you need.

Edit: And another small question. Do you have a clue whether the dayz_inside variable works for custom buildings that were included by the editor?

Link to comment
Share on other sites

hey @DAmNRelentless ..

Quote

Why are you transfering the whole publicEH.sqf to the client?

the most clean way is that you said. use jsut the line that you gonna use.. in my case i use a full copy of publicEh.. cuz i play a lot with this file..its just an habit... sorry for passing my bad habits :laugh:

Quote

Do you have a clue whether the dayz_inside variable works for custom buildings that were included by the editor?

i think yes cuz im using that Bunker showed in the video.
Link to comment
Share on other sites

Just now, Hooty said:

2 questions.  Could I use the no leave with the most wanted script and can i add more then one call to the pause.

Example   onPauseScript = "sandstorm\noleave.sqf","BLAH\BLAH.sqf";           

yes or include this block at bottom of your blah.sqf

if (sandstormvar) exitWith {
                _esc closedisplay 0;
                 systemchat ("<ANTIHACK>:Cannot Abort in a sandstorm");
                }; 
                   //your variable about ESC key cannot be called _esc  take a look on it.

 

for example this is my whole noleave.sqf ( i use just one file to put all restrictions)

Spoiler

	[] spawn {
		private["_playerpos","_DMzone","_DMrange","_inDM","_inVehicle","_vehicle","_colorTXT","_btnTitle0TXT","_btnTitle1TXT","_btnTitle2TXT","_startTime","_display","_btnSave","_btnRestart","_btnRespawn","_btnTitle0","_btnTitle1","_btnTitle2"];
			_colorTXT =  [0.8,0.2,0,1];
			_btnTitle0TXT = "NUCLEAR WARS";
			_btnTitle1TXT = "SURVIVAL MOD";
			_btnTitle2TXT = "";
			disableSerialization;
			_startTime = time;
			while{1 == 1}do
			{
				waitUntil {uiSleep 0.1;!isNull findDisplay 49};
				_display = findDisplay 49;
				if(!isNull _display)then
				{
					_btnSave = _display displayCtrl 103;
					_btnSave ctrlShow true;
					_btnSave ctrlEnable false;
					_btnSave ctrlSetScale 0.8;
					_btnSave ctrlSetText 'PlayerUID (SteamID):';
					_btnSave ctrlCommit 0;
					
					_btnRestart = _display displayCtrl 119;
					_btnRestart ctrlShow true;
					_btnRestart ctrlEnable false;
					_btnRestart ctrlSetScale 0.9;
					_btnRestart ctrlSetText (format['%1',getPlayerUID player]);
					_btnRestart ctrlCommit 0;
					
					_btnRespawn = _display displayCtrl 1010;
					_btnRespawn ctrlShow true;
					_btnRespawn ctrlSetScale 0.9;
					if((canStand player) || (deathHandled))then
					{
						_btnRespawn ctrlEnable false;
						_btnRespawn ctrlSetText 'byJuandayz';
					}
					else
					{
						_waitTime = 180;
						_btnRespawn ctrlEnable false;
						_btnRespawn ctrlSetText format['wait %1s',round((_startTime + _waitTime) - time)];
						if(time > _startTime + _waitTime)then
						{
							_btnRespawn ctrlEnable true;
							_btnRespawn ctrlSetText 'Respawn';
							_startTime = time;
						};
					};
					_btnRespawn buttonSetAction '[player,''btnRespawn''] spawn player_death;player setHit[''Body'',1];
					';
					_btnRespawn ctrlCommit 0;
					
					_btnTitle0 = _display displayCtrl 523;
					_btnTitle0 ctrlSetText _btnTitle0TXT;
					_btnTitle0 ctrlSetTextColor _colorTXT;
					_btnTitle0 ctrlSetScale 0.9;
					_btnTitle0 ctrlCommit 0;
					
					_btnTitle1 = _display displayCtrl 121;
					_btnTitle1 ctrlSetText _btnTitle1TXT;
					_btnTitle1 ctrlSetTextColor _colorTXT;
					_btnTitle1 ctrlSetScale 0.9;
					_btnTitle1 ctrlCommit 0;
					
					_btnTitle2 = _display displayCtrl 120;
					_btnTitle2 ctrlSetText _btnTitle2TXT;
					_btnTitle2 ctrlSetTextColor _colorTXT;
					_btnTitle2 ctrlSetScale 0.9;
					_btnTitle2 ctrlCommit 0;
					
					_vehicle = vehicle player;
                    _inVehicle = (_vehicle != player);
                    if (_inVehicle) exitWith {
                    systemchat "<ANTIHACK>: You cannot log out in vehicles!";
                    _display closedisplay 0;
                    };
					_playerpos = getpos player;
					_DMzone = [3412.77,3929.4153,0];    
                    _DMrange = 150;
                    _inDM = false;
                    
                  
				  
				  if (acidrainvar) exitWith {
                _display closedisplay 0;
                 systemchat ("<ANTIHACK>:Cannot Abort in a acidrain");
                };
                  
				  
				  
                 if (sandstormvar) exitWith {
                _display closedisplay 0;
                 systemchat ("<ANTIHACK>:Cannot Abort in a sandstorm");
                };
				
				 if (rfogvar) exitWith {
                _display closedisplay 0;
                 systemchat ("<ANTIHACK>:Cannot Abort in a radioactivefog");
                };
                  
				if (inBunker) exitWith {
                _display closedisplay 0;
                 systemchat ("<ANTIHACK>:Cannot Abort into a bunker");
                };  
			
				};
			};
		};

 

 

Link to comment
Share on other sites

On 9/19/2017 at 6:40 PM, juandayz said:

yes or include this block at bottom of your blah.sqf


if (sandstormvar) exitWith {
                _esc closedisplay 0;
                 systemchat ("<ANTIHACK>:Cannot Abort in a sandstorm");
                }; 
                   //your variable about ESC key cannot be called _esc  take a look on it.

 

for example this is my whole noleave.sqf ( i use just one file to put all restrictions)

  Hide contents


	[] spawn {
		private["_playerpos","_DMzone","_DMrange","_inDM","_inVehicle","_vehicle","_colorTXT","_btnTitle0TXT","_btnTitle1TXT","_btnTitle2TXT","_startTime","_display","_btnSave","_btnRestart","_btnRespawn","_btnTitle0","_btnTitle1","_btnTitle2"];
			_colorTXT =  [0.8,0.2,0,1];
			_btnTitle0TXT = "NUCLEAR WARS";
			_btnTitle1TXT = "SURVIVAL MOD";
			_btnTitle2TXT = "";
			disableSerialization;
			_startTime = time;
			while{1 == 1}do
			{
				waitUntil {uiSleep 0.1;!isNull findDisplay 49};
				_display = findDisplay 49;
				if(!isNull _display)then
				{
					_btnSave = _display displayCtrl 103;
					_btnSave ctrlShow true;
					_btnSave ctrlEnable false;
					_btnSave ctrlSetScale 0.8;
					_btnSave ctrlSetText 'PlayerUID (SteamID):';
					_btnSave ctrlCommit 0;
					
					_btnRestart = _display displayCtrl 119;
					_btnRestart ctrlShow true;
					_btnRestart ctrlEnable false;
					_btnRestart ctrlSetScale 0.9;
					_btnRestart ctrlSetText (format['%1',getPlayerUID player]);
					_btnRestart ctrlCommit 0;
					
					_btnRespawn = _display displayCtrl 1010;
					_btnRespawn ctrlShow true;
					_btnRespawn ctrlSetScale 0.9;
					if((canStand player) || (deathHandled))then
					{
						_btnRespawn ctrlEnable false;
						_btnRespawn ctrlSetText 'byJuandayz';
					}
					else
					{
						_waitTime = 180;
						_btnRespawn ctrlEnable false;
						_btnRespawn ctrlSetText format['wait %1s',round((_startTime + _waitTime) - time)];
						if(time > _startTime + _waitTime)then
						{
							_btnRespawn ctrlEnable true;
							_btnRespawn ctrlSetText 'Respawn';
							_startTime = time;
						};
					};
					_btnRespawn buttonSetAction '[player,''btnRespawn''] spawn player_death;player setHit[''Body'',1];
					';
					_btnRespawn ctrlCommit 0;
					
					_btnTitle0 = _display displayCtrl 523;
					_btnTitle0 ctrlSetText _btnTitle0TXT;
					_btnTitle0 ctrlSetTextColor _colorTXT;
					_btnTitle0 ctrlSetScale 0.9;
					_btnTitle0 ctrlCommit 0;
					
					_btnTitle1 = _display displayCtrl 121;
					_btnTitle1 ctrlSetText _btnTitle1TXT;
					_btnTitle1 ctrlSetTextColor _colorTXT;
					_btnTitle1 ctrlSetScale 0.9;
					_btnTitle1 ctrlCommit 0;
					
					_btnTitle2 = _display displayCtrl 120;
					_btnTitle2 ctrlSetText _btnTitle2TXT;
					_btnTitle2 ctrlSetTextColor _colorTXT;
					_btnTitle2 ctrlSetScale 0.9;
					_btnTitle2 ctrlCommit 0;
					
					_vehicle = vehicle player;
                    _inVehicle = (_vehicle != player);
                    if (_inVehicle) exitWith {
                    systemchat "<ANTIHACK>: You cannot log out in vehicles!";
                    _display closedisplay 0;
                    };
					_playerpos = getpos player;
					_DMzone = [3412.77,3929.4153,0];    
                    _DMrange = 150;
                    _inDM = false;
                    
                  
				  
				  if (acidrainvar) exitWith {
                _display closedisplay 0;
                 systemchat ("<ANTIHACK>:Cannot Abort in a acidrain");
                };
                  
				  
				  
                 if (sandstormvar) exitWith {
                _display closedisplay 0;
                 systemchat ("<ANTIHACK>:Cannot Abort in a sandstorm");
                };
				
				 if (rfogvar) exitWith {
                _display closedisplay 0;
                 systemchat ("<ANTIHACK>:Cannot Abort in a radioactivefog");
                };
                  
				if (inBunker) exitWith {
                _display closedisplay 0;
                 systemchat ("<ANTIHACK>:Cannot Abort into a bunker");
                };  
			
				};
			};
		};

 

 

Thanks Buddy !!! 

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
  • Discord

×
×
  • Create New...