Jump to content
  • 0

1 Stage Building


Renegade2k6

Question

Anyone know how to bi pass the building stages so that its 1 every time?

 

I know the code location but when I try to override, it sticks in a you are already building loop.

//_tmpbuilt setPosATL _location;

		
		cutText [format[(localize "str_epoch_player_138"),_text], "PLAIN DOWN"];
		
		_limit = 3;

		if(isNumber (configFile >> "CfgVehicles" >> _classname >> "constructioncount")) then {
			_limit = getNumber(configFile >> "CfgVehicles" >> _classname >> "constructioncount");
		};
Link to comment
Share on other sites

Recommended Posts

  • 0

so this goes on player_build.sqf around line 400?

 

 

replace this:

		_tmpbuilt setPosATL _location;

		
		cutText [format[(localize "str_epoch_player_138"),_text], "PLAIN DOWN"];
		
		_limit = 3;

		if(isNumber (configFile >> "CfgVehicles" >> _classname >> "constructioncount")) then {
			_limit = getNumber(configFile >> "CfgVehicles" >> _classname >> "constructioncount");
		};

with this?

        //_tmpbuilt setPosATL _location;

        
        cutText [format[(localize "str_epoch_player_138"),_text], "PLAIN DOWN"];
        
        _limit = 1;

        if(isNumber (configFile >> "CfgVehicles" >> _classname >> "constructioncount")) then {
            _limit = 1;
        };

is that it? correct me if I'm wrong.

Link to comment
Share on other sites

  • 0

 

1.0.4.1 added this:
 
https://github.com/vbawol/DayZ-Epoch/blob/master/Documents/CHANGE%20LOG%201.0.4.1.txt#L4

[ADDED] Static build construction count will force the constructioncount to number set by DZE_StaticConstructionCount = # in init.sqf. @Fank

 
Also the remove error will be fixed for 1.0.4.2.

 

How about deconstruction count? Will that be getting it's own variable in init.sqf too?

Link to comment
Share on other sites

  • 0

 

You can use this code:

if((getPlayerUID player) in ["UID HERE","OTHER UID HERE"]) then {
     DZE_StaticConstructionCount = 1;
};

Thanks :)

Link to comment
Share on other sites

  • 0

hey,

me again :)

Would it be possible to get this into infistar like:

adminadd = adminadd + [" Instant build ",Instant build,"0","0","0","1",[0,0.8,1,1]]; ?

But how would i activate it, combined with 

if ((getPlayerUID player) in ["UID HERE","OTHER UID HERE"]) then {
DZE_StaticConstructionCount = 1;
}; 

Cheers

Exo

Link to comment
Share on other sites

  • 0

hey,

me again :)

Would it be possible to get this into infistar like:

adminadd = adminadd + [" Instant build ",Instant build,"0","0","0","1",[0,0.8,1,1]]; ?

But how would i activate it, combined with 

if ((getPlayerUID player) in ["UID HERE","OTHER UID HERE"]) then {
DZE_StaticConstructionCount = 1;
}; 

Cheers

Exo

 

Very sorry about late reply. The site did not tell me there was a new post. Not sure why, but I am not getting updates for this forum. I personally never worked with infistar so I have no idea how to do it.

 

If you are able to directly reference a .sqf file using infistar and you want this to be a toggle option you can create a .sqf file called FastBuild.sqf and paste this code into it:

_admins = ["UID HERE", "OTHER UID HERE"];
if(isNil isOn) then {isOn = true;} else {isOn = !isOn};

if (((getPlayerUID player) in _admins) && isOn) then {
DZE_StaticConstructionCount = 1;
} else {
DZE_StaticConstructionCount = 0;
};

Then you can just call the file. If you are calling the file with an admin tool that already requires checking of the admin uid delete the parts with _admins and it will work all the same.

 

 

I hope that helped some. I don't know what else to tell you considering I haven't seen any code for infistar.

Link to comment
Share on other sites

  • 0

Very sorry about late reply. The site did not tell me there was a new post. Not sure why, but I am not getting updates for this forum. I personally never worked with infistar so I have no idea how to do it.

 

If you are able to directly reference a .sqf file using infistar and you want this to be a toggle option you can create a .sqf file called FastBuild.sqf and paste this code into it:

_admins = ["UID HERE", "OTHER UID HERE"];
if(isNil isOn) then {isOn = true;} else {isOn = !isOn};

if (((getPlayerUID player) in _admins) && isOn) then {
DZE_StaticConstructionCount = 1;
} else {
DZE_StaticConstructionCount = 0;
};

Then you can just call the file. If you are calling the file with an admin tool that already requires checking of the admin uid delete the parts with _admins and it will work all the same.

 

 

I hope that helped some. I don't know what else to tell you considering I haven't seen any code for infistar.

Hmm ok I will try to work it out.

Thanks :)

If you want you can take a look at this infistar code...

 

And give me a help :P

Can you change thinks in the init sqf (DZE_StaticConstructionCount = 1;)

in another sqf?

 

And anoher question :P What does the " isNil isOn" do ?

Cheers

Exo

 

Link to comment
Share on other sites

  • 0

Hmm ok I will try to work it out.

Thanks :)

If you want you can take a look at this infistar code...

 

And give me a help :P

Can you change thinks in the init sqf (DZE_StaticConstructionCount = 1 ;)

in another sqf?

 

And anoher question :P What does the " isNil isOn" do ?

Cheers

Exo

 

 

The construction can be used outside of the init (I do this with the Epoch Admin Tools).

if(isNil isOn) then {isOn = true;} else {isOn = !isOn};

The above line can be read like so:

If the variable named isOn has no value then set isOn equal to true. If isOn does have a value, negate it (i.e. true becomes false or false becomes true).

 

It is a way of initializing a variable.

 

Now that you have provided me with a link for code I can write it out for you:

 

adminadd = adminadd + [" Fast Build Enable",fastBuildEnable,"0","0","0","1",[0,0.8,1,1]];
adminadd = adminadd + [" Fast Build Disable",fastBuildDisable,"0","0","0","1",[0,0.8,1,1]];

fastBuildEnable =
{
DZE_StaticConstructionCount = 1;
cutText ["Fast Building Enabled", "PLAIN DOWN"];
_savelog = format["Fast Building Enabled"];
PVAH_WriteLogReq = [_savelog];
publicVariableServer "PVAH_WriteLogReq";
};

fastBuildDisable =
{
DZE_StaticConstructionCount = 0;
cutText ["Fast Building Disabled", "PLAIN DOWN"];
_savelog = format["Fast Building Disabled"];
PVAH_WriteLogReq = [_savelog];
publicVariableServer "PVAH_WriteLogReq";
}; 

 

To my knowledge this will only work for the admin who calls it. For example if you enable fast building using this ONLY you will have fast build.

The code can probably be reduced into a single option like I posted earlier, however I have not messed around with this coding style so I can't be sure it would work. This is the safest method to go with the little knowledge of the coding practices required for this admin tool.

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