Jump to content

Attach objects to vehicles...


Colakohle

Recommended Posts

local ccx,ccy,ccz,ccrx,ccry,ccrz= 0,2.5,0.1,0,0,0 
local cx,cy,cz,crx,cry,crz= 0,-1.5,-0.1,0,0,-90 
local x,y,z,rx,ry,rz= -0.7,-0.0,0.8,0,0,-90 
local ax,ay,az,arx,ary,arz= -0.4,-0.0,0.8,0,0,-90 
local aax,aay,aaz,aarx,aary,aarz= -0.1,-0.0,0.8,0,0,-90 
local aaax,aaay,aaaz,aaarx,aaary,aaarz= 0.2,-0.0,0.8,0,0,-90 
local aaaax,aaaay,aaaaz,aaaarx,aaaary,aaaarz= 0.5,-0.0,0.8,0,0,-90 
  
function upgradeTheCar(cmd) 
    local veh = getPedOccupiedVehicle ( localPlayer ) 
    cminigun = createObject( 1636, 2,2,2) 
    minigun = createObject( 2985, 2,2,2) 
    base = createObject( 360, 2,2,2) 
    abase = createObject( 360, 2,2,2) 
    aabase = createObject( 360, 2,2,2) 
    aaabase = createObject( 360, 2,2,2) 
    aaaabase = createObject( 360, 2,2,2) 
    setElementCollisionsEnabled ( base, false ) 
    attachElements ( cminigun, veh,  ccx,ccy,ccz,ccrx,ccry,ccrz) 
    attachElements ( minigun, veh,  cx,cy,cz,crx,cry,crz) 
    attachElements ( base, veh,  x,y,z,rx,ry,rz)  
    attachElements ( abase, veh,  ax,ay,az,arx,ary,arz)  
    attachElements ( aabase, veh,  aax,aay,aaz,aarx,aary,aarz)  
    attachElements ( aaabase, veh,  aaax,aaay,aaaz,aaarx,aaary,aaarz)  
    attachElements ( aaaabase, veh,  aaaax,aaaay,aaaaz,aaaarx,aaaary,aaaarz)  
    end 
  
addCommandHandler("upgradeMyCar", upgradeTheCar) 

this is the sample. if you type command /upgradeMyCar

it will make some things like that.

You can modyfy it free :)

P.S when you type command go out of vehicle.

Edited by Guest
Link to comment
Thanks! :D

i hope it works perfect :D

Edit: it don't work... i made an meta.xml and an script.lua and then i put it into an zip file.

i put it on my server started the resource enter the command but it ain't work... D:

Did you make it client side? And when you enter command the go out of car!

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