ReDBaroN Posted October 6, 2017 Report Share Posted October 6, 2017 We're having a problem where players have worked out that you can build a bike half into a wall, get on it and pass through the wall without triggering the anti-wall protection. In the deploy config I see we can add a condition at the end. does anyone know what the code would be to not let players deploy a bike within x metres of a plot pole? Thanks Link to comment Share on other sites More sharing options...
juandayz Posted October 6, 2017 Report Share Posted October 6, 2017 Just now, ReDBaroN said: We're having a problem where players have worked out that you can build a bike half into a wall, get on it and pass through the wall without triggering the anti-wall protection. In the deploy config I see we can add a condition at the end. does anyone know what the code would be to not let players deploy a bike within x metres of a plot pole? Thanks maybe a better idea is add a nearest wall restriction in player_deploy.sqf Spoiler FIND: //### BEGIN MODIFIED CODE: player_deploy //_classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create"); //_classnametmp = _classname; //_require = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> "Build" >> "require"); //_text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName"); //_ghost = getText (configFile >> "CfgVehicles" >> _classname >> "ghostpreview"); _classname = _index call getDeployableClass; _classnametmp = _classname; _require = []; _text = _index call getDeployableDisplay; _ghost = ""; //### END MODIFIED CODE: player_deploy PASTE BELOW: _pos = [player] call FNC_GetPos; _NOTALLOW = ["WoodSmallWall_DZ","CinderWallHalf_DZ","CinderWall_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorway_DZ","WoodSmallWallThird_DZ", "WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","Land_DZE_WoodDoor","Land_DZE_WoodDoorLocked","Land_DZE_GarageWoodDoor","Land_DZE_GarageWoodDoorLocked","WoodLargeWall_DZ", "WoodLargeWallWin_DZ","WoodLargeWallDoor_DZ","Land_DZE_LargeWoodDoor","Land_DZE_LargeWoodDoorLocked"]; _nearRestr = count nearestObjects [_pos, _NOTALLOW, 5] > 0; if (_nearRestr && (_classname isKindOf "MMT_Civ")) exitWith { dayz_actionInProgress = false; systemChat("Bikes Not Allowed near of walls"); }; if ure using Two diferents bikes.. then add another check: _pos = [player] call FNC_GetPos; _NOTALLOW = ["WoodSmallWall_DZ","CinderWallHalf_DZ","CinderWall_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorway_DZ","WoodSmallWallThird_DZ", "WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","Land_DZE_WoodDoor","Land_DZE_WoodDoorLocked","Land_DZE_GarageWoodDoor","Land_DZE_GarageWoodDoorLocked","WoodLargeWall_DZ", "WoodLargeWallWin_DZ","WoodLargeWallDoor_DZ","Land_DZE_LargeWoodDoor","Land_DZE_LargeWoodDoorLocked"]; _nearRestr = count nearestObjects [_pos, _NOTALLOW, 5] > 0; if (_nearRestr && (_classname isKindOf "MMT_Civ")or (_classname isKindOf "Old_bike_TK_INS_EP1")) exitWith { dayz_actionInProgress = false; systemChat("Bikes Not Allowed near of walls"); }; ReDBaroN and salival 2 Link to comment Share on other sites More sharing options...
salival Posted October 6, 2017 Report Share Posted October 6, 2017 12 minutes ago, juandayz said: maybe better is add a nearest wall restriction in player_deploy.sqf FIND: //### BEGIN MODIFIED CODE: player_deploy //_classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create"); //_classnametmp = _classname; //_require = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> "Build" >> "require"); //_text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName"); //_ghost = getText (configFile >> "CfgVehicles" >> _classname >> "ghostpreview"); _classname = _index call getDeployableClass; _classnametmp = _classname; _require = []; _text = _index call getDeployableDisplay; _ghost = ""; //### END MODIFIED CODE: player_deploy PASTE BELOW: _pos = [player] call FNC_GetPos; _NOTALLOW = ["WoodSmallWall_DZ","CinderWallHalf_DZ","CinderWall_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorway_DZ","WoodSmallWallThird_DZ", "WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","Land_DZE_WoodDoor","Land_DZE_WoodDoorLocked","Land_DZE_GarageWoodDoor","Land_DZE_GarageWoodDoorLocked","WoodLargeWall_DZ", "WoodLargeWallWin_DZ","WoodLargeWallDoor_DZ","Land_DZE_LargeWoodDoor","Land_DZE_LargeWoodDoorLocked"]; _nearRestr = count nearestObjects [_pos, _NOTALLOW, 5] > 0; if (_nearRestr && (_classname isKindOf "MMT_Civ")) exitWith { dayz_actionInProgress = false; systemChat("This Object is Not Allowed near of a wall"); }; I think this is a really good solution, but I think it should be further down after you place the deployable, since the player can be away from the wall/door but the deployable can be "inside" it ReDBaroN 1 Link to comment Share on other sites More sharing options...
juandayz Posted October 6, 2017 Report Share Posted October 6, 2017 1 minute ago, salival said: I think this is a really good solution, but I think it should be further down after you place the deployable, since the player can be away from the wall/door but the deployable can be "inside" it Good point. Maybe if we increase the distance from walls? Same distance as the offset of the bike? ReDBaroN 1 Link to comment Share on other sites More sharing options...
salival Posted October 7, 2017 Report Share Posted October 7, 2017 This is the version I settled on: in player_deploy.sqf find this line (or similar): if (!(_index call getDeployableBuildOnRoad)) then {if (isOnRoad [_position select 0, _position select 1, 0]) then { _cancel = true; _reason = localize "STR_EPOCH_BUILD_FAIL_ROAD";};}; Add this code block after it: if (_classname isKindOf "MotorCycle") then { if (count (nearestObjects [_position, ["Building","DZE_Housebase"], 5]) > 0) then { _cancel = true; _reason = format ["%1 can not be built near a wall/door",_text]; }; }; juandayz and ReDBaroN 2 Link to comment Share on other sites More sharing options...
ReDBaroN Posted October 7, 2017 Report Share Posted October 7, 2017 Superb, thanks chaps! juandayz 1 Link to comment Share on other sites More sharing options...
ReDBaroN Posted November 29, 2017 Report Share Posted November 29, 2017 We use "Land_MBG_Garage_Single_A" as a deployable garage and link virtual garage to this building. When a player deploys this they will only get the pack option during that life. If they die, they lose the option. ["ItemToolbox",[0,9,2],5,0.9,false,true,false,true,true,false,false,["Land_MBG_Garage_Single_A"],[],["ItemTopaz"],"true"] As you can see above, we have the option "_packAny | can anyone repack the deployable?" set to false to prevent random players packing the garage and getting the garage owner's Topaz but, I think it's this that's linking it to character ID which refreshes for players each time they die. Is there a way to modify the code somehow so it works the same way as other epoch base parts since Plot for Life was built in with version 106? Link to comment Share on other sites More sharing options...
Runewulv Posted November 29, 2017 Report Share Posted November 29, 2017 4 hours ago, ReDBaroN said: We use "Land_MBG_Garage_Single_A" as a deployable garage and link virtual garage to this building. When a player deploys this they will only get the pack option during that life. If they die, they lose the option. ["ItemToolbox",[0,9,2],5,0.9,false,true,false,true,true,false,false,["Land_MBG_Garage_Single_A"],[],["ItemTopaz"],"true"] As you can see above, we have the option "_packAny | can anyone repack the deployable?" set to false to prevent random players packing the garage and getting the garage owner's Topaz but, I think it's this that's linking it to character ID which refreshes for players each time they die. Is there a way to modify the code somehow so it works the same way as other epoch base parts since Plot for Life was built in with version 106? you could keep it as anyone can repack the deployable and then add it to the garage to restrict removal variable in your ConfigVariables.sqf. The restrict removal option keeps anyone from removing anything from your plot thats in that array without permission on the plot pole first. Schalldampfer and ReDBaroN 2 Link to comment Share on other sites More sharing options...
l1nkrx7 Posted November 29, 2017 Report Share Posted November 29, 2017 Anyone fixed save to database yet Link to comment Share on other sites More sharing options...
Rust Posted November 30, 2017 Report Share Posted November 30, 2017 I'm using your script and it runs fine, works etc. However players are saying they don't get the option to pack or its very difficult to see (EG it only stays for half a second and then they have try and get it again). Whenever I look at the bike its very easy to pack, is there a reason why its hard for players to see the option? Link to comment Share on other sites More sharing options...
ReDBaroN Posted November 30, 2017 Report Share Posted November 30, 2017 @Runewulv Thanks for that idea! @l1nkrx7 DB saving already works. Check the config file and make sure you have the DB saving set to true for the deploy option you're having problems with @Rust You need to add exceptions to your Allowed actions array in infistar: /* ALLOWED Actions "_dayzActions" are only used if you have "_CSA = true;" */ _dayzActions = [ ......,"DZE_ACTION_DEPLOYABLE_PACK_0","DZE_ACTION_DEPLOYABLE_PACK_2" ]; So, in my example above the first option in the config to deploy that you also want to pack is DZE_ACTION_DEPLOYABLE_PACK_0. I don't need to pack the next on the list but, do with the 3rd hence, DZE_ACTION_DEPLOYABLE_PACK_2 Hope that makes sense... :) Link to comment Share on other sites More sharing options...
ReDBaroN Posted November 30, 2017 Report Share Posted November 30, 2017 @Runewulv Just tried your suggestion and I still get the action to pack when I'm not on the plot....not sure why yet Link to comment Share on other sites More sharing options...
Runewulv Posted November 30, 2017 Report Share Posted November 30, 2017 are you an admin and gave yourself admin access to plot poles on your variables? If you put your UID in the plot management array for plot poles in configvariables.sqf it will make every plot pole act as if you have permission on them. Link to comment Share on other sites More sharing options...
ReDBaroN Posted November 30, 2017 Report Share Posted November 30, 2017 took myself off door and plot management..... Runewulv 1 Link to comment Share on other sites More sharing options...
l1nkrx7 Posted December 1, 2017 Report Share Posted December 1, 2017 I've setup the save to hive but nothing goes in database at all but no big deal as I'm using this for normal deploy and pack and alchemy for buildables Link to comment Share on other sites More sharing options...
looter809 Posted December 1, 2017 Report Share Posted December 1, 2017 On 8/22/2017 at 2:10 PM, salival said: I'm at work at the moment but I stopped using publish_vehicle2 or whatever it is and just used obj publish, there's other stuff to be done to fix it but that's the general thing. I may look at releasing my fork at some point (there's lots of changes not on my repo 9of my fork) that fixes a lot more things and is designed for static guns/building deployables.s. @l1nkrx7 This was posted by @salival and this is the fix. I'll show you what my player_deploy.sqf looks like: search for if (_proceed) then { Spoiler if (_proceed) then { if([player,_index] call getHasDeployableParts) then { [player,_index] call removeDeployableParts; [format[localize "str_build_01",_text],1] call dayz_rollingMessages; _tmpbuilt setVariable ["OEMPos",_location,true]; if (_index call getPermanent) then { _tmpbuilt call fnc_set_temp_deployable_id; if(_index call getDeployableSimulation) then { PVDZ_obj_Publish = [call fnc_perm_deployable_id,_tmpbuilt,[_dir,_position],(_index call getDeployableClass)]; publicVariableServer "PVDZ_obj_Publish"; } else { PVDZ_obj_Publish = [call fnc_perm_deployable_id,_tmpbuilt,[_dir,_position],(_index call getDeployableClass)]; publicVariableServer "PVDZ_obj_Publish"; }; } else { _tmpbuilt call fnc_set_temp_deployable_id; }; if . . . . . ... . . . .. . so if you just have it save as object as @salival said then it will work as intended. Link to comment Share on other sites More sharing options...
Rust Posted December 1, 2017 Report Share Posted December 1, 2017 Spoiler On 11/30/2017 at 9:58 PM, ReDBaroN said: @Runewulv Thanks for that idea! @l1nkrx7 DB saving already works. Check the config file and make sure you have the DB saving set to true for the deploy option you're having problems with @Rust You need to add exceptions to your Allowed actions array in infistar: /* ALLOWED Actions "_dayzActions" are only used if you have "_CSA = true;" */ _dayzActions = [ ......,"DZE_ACTION_DEPLOYABLE_PACK_0","DZE_ACTION_DEPLOYABLE_PACK_2" ]; So, in my example above the first option in the config to deploy that you also want to pack is DZE_ACTION_DEPLOYABLE_PACK_0. I don't need to pack the next on the list but, do with the 3rd hence, DZE_ACTION_DEPLOYABLE_PACK_2 Hope that makes sense... :) Thanks for that, worked perfect looter809 1 Link to comment Share on other sites More sharing options...
dodget90 Posted December 27, 2017 Report Share Posted December 27, 2017 nver mind i sorted it Link to comment Share on other sites More sharing options...
Cubitron Posted December 28, 2017 Report Share Posted December 28, 2017 Afetr update 1.0.6.2 its not saving to database, i try a fresh server vanilla files Link to comment Share on other sites More sharing options...
Cubitron Posted January 6, 2018 Report Share Posted January 6, 2018 Aloha, one problem if i craft a gyro it spawns 2 gyros ["ItemToolbox",[0,8,2],7,0.1,true,true,false,true,false,true,true,["CSJ_GyroC"],[],["PartVRotor","PartEngine","PartFueltank"],"true"], Link to comment Share on other sites More sharing options...
totis Posted January 6, 2018 Report Share Posted January 6, 2018 try this: [0,9,3],5,0.6,false,false,false,false,false,true,true, Link to comment Share on other sites More sharing options...
WLF Posted January 8, 2018 Report Share Posted January 8, 2018 Hi all ! When I deploy a HeliPad (for salival's VirtualGarage script) I see a message "This vehicle is permanent and will persist through server restarts!". But after restart a helipad disappears. I using this line in config: ["ItemToolbox",[0,9,2],5,0.9,false,true,false,true,true,false,true,["HeliHCivil"],[],[],"true"] And one more question: Where can I change the width of buttons? Screenshot. Link to comment Share on other sites More sharing options...
motschler1 Posted January 9, 2018 Report Share Posted January 9, 2018 I have the same problem 8 hours ago, WLF said: Hi all ! When I deploy a HeliPad (for salival's VirtualGarage script) I see a message "This vehicle is permanent and will persist through server restarts!". But after restart a helipad disappears. I using this line in config: ["ItemToolbox",[0,9,2],5,0.9,false,true,false,true,true,false,true,["HeliHCivil"],[],[],"true"] Link to comment Share on other sites More sharing options...
totis Posted January 9, 2018 Report Share Posted January 9, 2018 My settings are these if u wanna test: ,false,true,false,true,true,false,false, Link to comment Share on other sites More sharing options...
WLF Posted January 9, 2018 Report Share Posted January 9, 2018 Nope, it does not help me. Logs: arma2oaserver_cherno.RPT HiveExt.log First part - deploing helipad, getting a chopper from Virtual Garage. Second - after restarting server. Helipad disappeared. Link to comment Share on other sites More sharing options...
Recommended Posts