Jump to content

[MTA][DayZ] Adding a vechile


Stones

Recommended Posts

Hello there people, basically the title ask's you what i would like assistance with, i got the um complied version of the script so i'm free to add new vechiles, edit and add new back pack slots ect.

I asked him to make a TXT document explaining how to add a new vechile, and he give me this

OW TO ADD NEW VEHICLES 
  
1) Set a definition for the vehicle in vehicle_spawns.lua and coordinates for spawnpoints of vehicle 
EXAMPLE (for Hustler): 
  
hustlerSpawns = { 
  
{0,0,3}, 
  
} 
  
Hustler in the example above will spawn in x=0, y=0, z=3 (Blueberry Acres). 
  
2) Search for function called "spawnDayZVehicles()" in vehicle_spawns.lua. 
  
3) Search for "[NEW VEHICLES!]". That's where you will insert the code for your new vehicles. 
  
4) Copy and paste this: 
  
    for i,veh in ipairs(hustlerSpawns) do 
        local x,y,z = veh[1],veh[2],veh[3] 
        veh = createVehicle(545,x,y,z) 
        vehCol = createColSphere(x,y,z,1.5) 
        attachElements ( vehCol, veh, 0, 0, 0 ) 
        setElementData(vehCol,"parent",veh) 
        setElementData(veh,"parent",vehCol) 
        setElementData(vehCol,"vehicle",true) 
        setElementData(vehCol,"MAX_Slots",20) 
        --Engine + Tires 
        local tires,engine,parts = getVehicleAddonInfos (getElementModel(veh)) 
        setElementData(vehCol,"Tire_inVehicle",math.random(0,tires)) 
        setElementData(vehCol,"Engine_inVehicle",math.random(0,engine)) 
        setElementData(vehCol,"Parts_inVehicle",math.random(0,parts)) 
        --vehicle_indentifikation 
        setElementData(vehCol,"spawn",{545,x,y,z}) 
        --others 
        setElementData(vehCol,"fuel",60) 
    end 
  
5) Tables are scattered across the whole script, called vehicleAddonsInfo and vehicleFuelInfo. 
Search for them. 
  
  
vehicleAddonsInfo: 
{ID,Tire,Engine,Tank Parts}, 
  
  
vehicleFuelInfo: 
{ID,Fuelloss per minute}, 
  
  
6) Adding aircrafts and more helis is currently bugged and results in a corrupted database as well 
as increased network trouble for clients. 

I do understand a few things but, i'm no LUA scripter, and as ive said before i havent got the intelligence to learn.

If some one could make a document for me, explaining step by step what to do to add rustlers and new cars ect it, it would be amazing.

Thanks.

Link to comment

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.
×
×
  • Create New...