Renegade2k6 Posted December 26, 2013 Report Share Posted December 26, 2013 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"); }; bFe 1 Link to comment Share on other sites More sharing options...
0 Guest Posted April 16, 2014 Report Share Posted April 16, 2014 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. Thank you very very much :) !!! I am going to try it out :P Last question: Why would you set it to 0 when you dissable it ? Is it the default case ? Thank you again ! Exo Link to comment Share on other sites More sharing options...
0 NoxSicarius Posted April 16, 2014 Report Share Posted April 16, 2014 Thank you very very much :) !!! I am going to try it out :P Last question: Why would you set it to 0 when you dissable it ? Is it the default case ? Thank you again ! Exo The variable DZE_StaticConstructionCount only works with values greater than 0 so if you set it to 0 or less it uses the default value. Link to comment Share on other sites More sharing options...
0 Guest Posted April 17, 2014 Report Share Posted April 17, 2014 The variable DZE_StaticConstructionCount only works with values greater than 0 so if you set it to 0 or less it uses the default value. Works like a charm... THANKS :wub: :lol: Link to comment Share on other sites More sharing options...
0 Configurator Posted April 17, 2014 Report Share Posted April 17, 2014 Init.sqf DZE_StaticConstructionCount = 1; Link to comment Share on other sites More sharing options...
0 Guest Posted April 17, 2014 Report Share Posted April 17, 2014 Init.sqf DZE_StaticConstructionCount = 1; Yes but that would allow everyone to build in one stage :) Link to comment Share on other sites More sharing options...
0 NoxSicarius Posted April 17, 2014 Report Share Posted April 17, 2014 Init.sqf DZE_StaticConstructionCount = 1; This was already established on the first page of the topic. Link to comment Share on other sites More sharing options...
0 johnofwax Posted April 24, 2014 Report Share Posted April 24, 2014 Wish I had looked here before fighting through the bugs I encountered (like the 'already building something') I'm using the Snap-build by Maca / modified by OtterNas3 What I did to accomplish this was edit the player_build.sqf around line 300. It gets the job done though, just not as cleanly. if(!_cancel) then { _classname = _classnametmp; _location = _position; if((_isAllowedUnderGround == 0) and ((_location select 2) < 0)) then { _location set [2,0]; }; 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"); }; ////////// This is what I added. PlayerUIDs in the array. if ((getPlayerUID player) in ["##Admin1###","##Admin2###","##Admin3###","##Admin4###","##Admin5###"]) then { _limit = 1; }; ///////// _isOk = true; _proceed = false; _counter = 0; Link to comment Share on other sites More sharing options...
Question
Renegade2k6
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.
Link to comment
Share on other sites
32 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now