Jump to content
  • 0

[REQUEST] Deploy Virtual Garage/Helipad


Tricks

Question

Hello community,

 

With a lot of hard work and amazing help from GZA, we were able to get Virtual Garage to work on our hosted test server. Here is the link to his awesome script https://seafile.zomb...u/d/1cdde343bd/! GZA uses  deploy his garages. I don't want to use this large script for just this single reason.

 

I was hoping someone in this awesome community with the knowledge of scripting would be able to develop an addon that would allow the following:

 

1) Allow the item to be purchased from a trader eg. gem.

 

2) Deployment of: 

Land_MBG_Garage_Single_A

Land_MBG_Garage_Single_B

Land_MBG_Garage_Single_C

Land_MBG_Garage_Single_D

Helipad

 

3) Allow the player to adjust positioning of the garage or helipad before placement.

4) Have the item consumed after garage or helipad is placed.

 

I can't wait to see if someone is able to come up with something that works. This could be a great way to help with database performance by reducing the amount of cars on the server. Also help reduce the complaints of players vehicles "disappearing". Thanks in advance!!

Link to comment
Share on other sites

24 answers to this question

Recommended Posts

  • 0

The deploy anything script should do it for you. I personally dont quite understand how to add my own deployables in it. But i would imagine you have a bit more scripting knowledge than me and maybe you'll understand it.

I do know that you are able to move the position before placing your deployable with that script. Also it seems to save mozzie to db, and not the bike. So somewhere in there the ability to make sure it saves is also there.

Link to comment
Share on other sites

  • 0

@oSoDirty

Look at the script that posted, super easy. For example. This will give you a DSHKM_CDF, M2StaticMG or a SearchLight_CDF for Sipphire.

    //["ItemSapphire",[0,2,0],5,1,true,true,true,true,false,false,["DSHKM_CDF","M2StaticMG","SearchLight_CDF"],[],["ItemSapphire"],"true"]

Or this will give you a Land_Misc_Cargo1Ao or Land_Misc_Cargo1Bo and you have to have 4 metal_panel_kit in your inventory.

    ["ItemCrowbar",[0,6,0],5,-1,false,true,false,true,true,false,false,["Land_Misc_Cargo1Ao","Land_Misc_Cargo1Bo"],[],["metal_panel_kit","metal_panel_kit","metal_panel_kit","metal_panel_kit"],"true"]

Here is the code for it. What all numbers and stuff mean.

//  **FORMAT** -- (note no comma after last array entry)
//
//  DZE_DEPLOYABLES_CONFIG = [
//      [_clickItem,_deployOffset,_packDistance,_damageLimit,_packAny,_cargo,_ammo,_hive,_plot,_simulation,_road,_deployables,_near,_parts,_condition],
//      [_clickItem,_deployOffset,_packDistance,_damageLimit,_packAny,_cargo,_ammo,_hive,_plot,_simulation,_road,_deployables,_near,_parts,_condition],
//      [...more stuff here...]
//  ];
//    
//  parameter    | description                                                         |  type  | example
// --------------|---------------------------------------------------------------------|--------|--------
// _clickItem    | class name of the item to click on                                  | string | "ItemToolbox"
// _deployOffset | [_side,_front,_up] array to offset the deployable when buiding      | array  | [0,2,1]
// _packDistance | how close does the packer need to be to pack the object?            | number | 5
// _damageLimit  | item can't be repacked if damage is > this. (-1 = no re-packing)    | number | 0.1
// _packAny      | can anyone repack the deployable?                                   | bool   | false
// _cargo        | clear the cargo of the deployable?                                  | bool   | false
// _ammo         | should vehicle ammo be cleared? (does not persist through restart)  | bool   | true
// _hive         | write deployable to database?                                       | bool   | false
// _plot         | require a plot from the owner to build the deployable?              | bool   | false
// _simulation   | enable simulation (movement/damage) for the object? (true for cars) | bool   | true
// _road         | enable road building for this object?                               | bool   | true
// _deployables  | array of class names that can be deployed with this method          | array  | ["MMT_Civ"]
// _near         | array of items required nearby to build (workshop/fire/fueltank)    | array  | []
// _parts        | array of parts required to build (will be taken from player)        | array  | ["ItemToolbox"]
// _condition    | string of code to evaluate to determine whether action is shown     | string | "!(isNull player) && {(getPlayerUID player) in DZE_DEPLOYABLE_ADMINS}"

Link to comment
Share on other sites

  • 0

 

@oSoDirty

Look at the script that posted, super easy. For example. This will give you a DSHKM_CDF, M2StaticMG or a SearchLight_CDF for Sipphire.

    //["ItemSapphire",[0,2,0],5,1,true,true,true,true,false,false,["DSHKM_CDF","M2StaticMG","SearchLight_CDF"],[],["ItemSapphire"],"true"]

Or this will give you a Land_Misc_Cargo1Ao or Land_Misc_Cargo1Bo and you have to have 4 metal_panel_kit in your inventory.

    ["ItemCrowbar",[0,6,0],5,-1,false,true,false,true,true,false,false,["Land_Misc_Cargo1Ao","Land_Misc_Cargo1Bo"],[],["metal_panel_kit","metal_panel_kit","metal_panel_kit","metal_panel_kit"],"true"]

Here is the code for it. What all numbers and stuff mean.

//  **FORMAT** -- (note no comma after last array entry)
//
//  DZE_DEPLOYABLES_CONFIG = [
//      [_clickItem,_deployOffset,_packDistance,_damageLimit,_packAny,_cargo,_ammo,_hive,_plot,_simulation,_road,_deployables,_near,_parts,_condition],
//      [_clickItem,_deployOffset,_packDistance,_damageLimit,_packAny,_cargo,_ammo,_hive,_plot,_simulation,_road,_deployables,_near,_parts,_condition],
//      [...more stuff here...]
//  ];
//    
//  parameter    | description                                                         |  type  | example
// --------------|---------------------------------------------------------------------|--------|--------
// _clickItem    | class name of the item to click on                                  | string | "ItemToolbox"
// _deployOffset | [_side,_front,_up] array to offset the deployable when buiding      | array  | [0,2,1]
// _packDistance | how close does the packer need to be to pack the object?            | number | 5
// _damageLimit  | item can't be repacked if damage is > this. (-1 = no re-packing)    | number | 0.1
// _packAny      | can anyone repack the deployable?                                   | bool   | false
// _cargo        | clear the cargo of the deployable?                                  | bool   | false
// _ammo         | should vehicle ammo be cleared? (does not persist through restart)  | bool   | true
// _hive         | write deployable to database?                                       | bool   | false
// _plot         | require a plot from the owner to build the deployable?              | bool   | false
// _simulation   | enable simulation (movement/damage) for the object? (true for cars) | bool   | true
// _road         | enable road building for this object?                               | bool   | true
// _deployables  | array of class names that can be deployed with this method          | array  | ["MMT_Civ"]
// _near         | array of items required nearby to build (workshop/fire/fueltank)    | array  | []
// _parts        | array of parts required to build (will be taken from player)        | array  | ["ItemToolbox"]
// _condition    | string of code to evaluate to determine whether action is shown     | string | "!(isNull player) && {(getPlayerUID player) in DZE_DEPLOYABLE_ADMINS}"

 

=] It is super easy. I guess i never took the time to look at it. Im a nub, what else can i say? But yea i was just coming back to say i got it to deploy a rusty tank near plots for fuel stations at base.

Link to comment
Share on other sites

  • 0

Great script, super easy to use! I have it working but can't get it going for my garage. Here is what I used:

["ItemRuby",[0,8,0],10,-1,false,false,false,true,true,false,true,["Land_MBG_Garage_Single_A","HeliH"],[],["ItemRuby"],"!(isNull player) && {(getPlayerUID player) in DZE_DEPLOYABLE_ADMINS}"]

It isn't working. I can deploy a bike, mozzie, so I know the script is working. But the garage wont appear, and there is no option on the ruby.

Link to comment
Share on other sites

  • 0

This is only for admins? If so, OK, otherwise replace everything after the last comma with:    "true"]     Edit: If you are intending if for admin use, did you define the admins?

 

Also, i would guess a common mistake would either be, A: you placed it at the end and didn't add a comma to the prior deployable. OR

 

B: You placed it after mozzie or bike and didnt add a comma to the end of yours.

 

Just guesses since your coding is correct and the only thing that is, or in this case could be missing, is a comma at the end.

Link to comment
Share on other sites

  • 0

I actually got this to work:

["ItemPlotDeed",[0,8,0],5,1,false,false,false,true,true,true,true,["Land_MBG_Garage_Single_A","HeliH"],[],["ItemPlotDeed"],"true"]

But there is still an option to pack it after, I would like to remove that.

Link to comment
Share on other sites

  • 0

=] It is super easy. I guess i never took the time to look at it. Im a nub, what else can i say? But yea i was just coming back to say i got it to deploy a rusty tank near plots for fuel stations at base.

Yes, I just love this script. And it's so easy to install. And like I said, you make everything. Also with the rest of the script, gps and map, you should be able to execute stuff. I haven't looked in to it, but should be able to do it.

Link to comment
Share on other sites

  • 0

Yes, I just love this script. And it's so easy to install. And like I said, you make everything. Also with the rest of the script, gps and map, you should be able to execute stuff. I haven't looked in to it, but should be able to do it.

 

 

Yes like merge DZGM with the right click function or something like that.

 

 

 

 

 

 

I actually got this to work:

["ItemPlotDeed",[0,8,0],5,1,false,false,false,true,true,true,true,["Land_MBG_Garage_Single_A","HeliH"],[],["ItemPlotDeed"],"true"]

But there is still an option to pack it after, I would like to remove that.

 

 

Change to 

["ItemPlotDeed",[0,8,0],5,-1,false,false,false,true,true,true,true,["Land_MBG_Garage_Single_A","HeliH"],[],["ItemPlotDeed"],"true"]
Link to comment
Share on other sites

  • 0

Ok since you cannot target the HeliH with your cursor to pack it. I want to make it so you can deploy a HeliH and it deletes at restart. I want to bind it to the ItemEtool, I have tried this but there is no click option on the ItemEtool.

["ItemEtool",[0,8,0],5,-1,false,true,false,true,false,false,["HeliH"],[],["ItemEtool"],"true"]

Ok got this to work!

["ItemEtool",[0,8,0],5,-1,false,false,false,false,true,true,true,["HeliH"],[],["ItemEtool","ItemToolbox"],"true"]
Edited by Tricks
Link to comment
Share on other sites

  • 0

One thing I notice with the Virtual Garage, when you retrieve the vehicle, it spawns in running.....

 

Easy fix, locate the server_spawnVehicle.sqf file in your server.pbo.

 

Remove the following on lines 191 and 192:

	_object engineOn true;
	sleep 1;

Vehicles and Heli's no longer spawn in with a running engine :)

Link to comment
Share on other sites

  • 0

Easy fix, locate the server_spawnVehicle.sqf file in your server.pbo.

 

Remove the following on lines 191 and 192:

	_object engineOn true;
	sleep 1;

Vehicles and Heli's no longer spawn in with a running engine :)

 

Yes use this fix or replace with the newest file of repository. Forgot to remove these lines before releasing it :)

Link to comment
Share on other sites

  • 0

[...] 0verHeat, is that a script you used, or did you simply added it to a custom trader? [...]

 

I'm just using the dialog to list, buy or sell all my custom buildings. I wrote my own config files for it. (including price, displayname etc.)

(e.g. you can access this menu on right clicking on your toolbox)

Link to comment
Share on other sites

  • 0

when I right click on the toolbox it says Deploy Garage and Deploy Yellow Border and Deploy Parachute jump target Deploy Garage is ok but I want to change Deploy Yellow Border and Deploy Parachute jump target to Deploy Helipad and Deploy Parking Lot can anyone plz help me

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