BetterDeadThanZed

[Release] Purchased vehicles spawn at specific location

195 posts in this topic

This script allows you to place helipads at your traders and vehicles will spawn at that location. There are two versions of this.

Version for default traders/traders created with the Eden editor, Exile version 1.0 and later. If you use the m3editor 0.18, which generates code using the old method, see further down in this post:

1. Using the Eden editor, place the helipad "Land_HelipadEmpty_F" where you want the vehicle to spawn and export that code however you export it in the Eden editor (I don't use the Eden editor so I don't know how that works). If you want an actual helipad to appear, you can place one over the invisible pad. The helipad must be within 50 meters of the trader.
2. Add that code with the helipad to your initServer.sqf.
3. Create a file called
ExileServer_system_trading_network_purchaseVehicleRequest.sqf with this code:  http://pastebin.com/D9EyZBGp
4. Create a folder in your mission pbo file called custom\helipad and put that .sqf file in there.
5. 
Open the config.cpp in your mission pbo and find the "CustomCode" section. Place this in that section: 

ExileServer_system_trading_network_purchaseVehicleRequest = "custom\helipad\ExileServer_system_trading_network_purchaseVehicleRequest.sqf";

If you do not want to use this at all of your traders, you can just not put a helipad there and it will default to the Exile spawning system. 

Thanks to @Xine for this method. See more information at these replies: 

If you are using m3editor 0.18, which generates the old format code, follow these instructions:

1. Place invisible helipads (Class name "Land_HelipadEmpty_F") at your trader cities for land and water vehicles. At the aircraft trader, place a visible helipad (Class name "Land_HelipadSquare_F"). The helipad must be within 50 meters of the trader.
2. Create a blank text file called ExileServer_system_trading_network_purchaseVehicleRequest.sqf file and copy it to your mission pbo, preferably in a folder called custom\helipad (or whatever you choose) and place this code in the file: http://pastebin.com/wvnqi8Zt
3. Open the config.cpp in your mission pbo and find the "CustomCode" section. Place this in that section:

ExileServer_system_trading_network_purchaseVehicleRequest = "custom\helipad\ExileServer_system_trading_network_purchaseVehicleRequest.sqf";

4. Repack your pbo and upload it along with the code with the helipads to your server and you are done.

Thank you for krwtt (one of my admins) for the original version of this script
Thank you to @GR8 for his modification to the script to make it work with Exile 0.9.4+
Thank you to @Scorpi for this modification to the script to make it work with Exile 0.9.8
Thank you to @Xine for his code for the Eden editor format code

19 people like this

Share this post


Link to post
Share on other sites

Hats off to your admin, was going to try something with this today, nice WAN :D

 

 

Works sweeet ;)

Edited by stonXer
1 person likes this

Share this post


Link to post
Share on other sites
Advertisement

This is brilliant. Trying it now. Becuase I use ViLayer its almost garunteed not to work lol ;p

 

Edit: Works flawlessly. Thanks On the other hand ive always had a reacurring problem of vehicles that some players buy spawning on the trader npc itself. Anyone know how to fix that?

Edited by Jski

Share this post


Link to post
Share on other sites

Brilliant release. 

Although you don't need to use M3Editor, you can do it with the normal 2DEditor as well, if you know how to use for example Eliteness and know how to merge it into existing code. :)

One quick question, I was wondering if it spawns in center of helipads or randomly within the helipad, as I had an idea with precise spawn location for the vehicle, but need to know whether it spawns in center or randomly :)

Share this post


Link to post
Share on other sites

You might wonna leave the ship one default else you will get boats on land

1 person likes this

Share this post


Link to post
Share on other sites

You might wonna leave the ship one default else you will get boats on land

I guess it's depending if their server has IgiLoad to load the boats to a truck (not sure if it works with normal boats, otherwise you can easily add them in IgiLoad with class names, and some position adjustments.) but yeah he should have mentioned that.

Share this post


Link to post
Share on other sites

Brilliant release. 

Although you don't need to use M3Editor, you can do it with the normal 2DEditor as well, if you know how to use for example Eliteness and know how to merge it into existing code. :)

One quick question, I was wondering if it spawns in center of helipads or randomly within the helipad, as I had an idea with precise spawn location for the vehicle, but need to know whether it spawns in center or randomly :)

I'm not really sure. The helipads are so small, I couldn't say.

You might wonna leave the ship one default else you will get boats on land

Not if you place the invisible helipad in the water. That's what I did. Then again, my boat traders are separate from my trader cities.

Share this post


Link to post
Share on other sites

reacurring problem of vehicles that some players buy spawning on the trader npc itself. Anyone know how to fix that?

 

For me this has never happened. My vehicles always spawn where they are supposed to. But some playersjust dont. I watched a player buy a atv and it spawned on the spawner then it moved back to the npc you by it from. confused

Share this post


Link to post
Share on other sites

reacurring problem of vehicles that some players buy spawning on the trader npc itself. Anyone know how to fix that?

 

For me this has never happened. My vehicles always spawn where they are supposed to. But some playersjust dont. I watched a player buy a atv and it spawned on the spawner then it moved back to the npc you by it from. confused

got infi anti-tp set as true?

1 person likes this

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.