Jump to content

[HELP] Attaching objects possition problem


..:D&G:..

Recommended Posts

Posted

Hi guys, I am trying to attach a gate to CJ garage but when I use attachElements, the gate gets in the middle of the garage, and turned 90 degrees

local garage = createObject(17950, tonumber(x), tonumber(y), tonumber(z), tonumber(rot1), tonumber(rot2), tonumber(rot3)) 
        local gate = createObject(17951, tonumber(x)+4.22, tonumber(y)+1.05, tonumber(z)-0.25, tonumber(rot1), tonumber(rot2), tonumber(rot3)-90) 
        attachElements ( gate, garage ) 

Any ideas?

76561198066470453.png

SP37Ecj.jpg?2MTA:Rust Pre-Alpha Build v.0.3:SP37Ecj.jpg?2

https://forum.mtasa.com/viewtopic.php?f=114&t=97848

2Pac: ''Only God can judge me!''

Posted
local garage = createObject(17950, tonumber(x), tonumber(y), tonumber(z), tonumber(rot1), tonumber(rot2), tonumber(rot3)) 
local gate = createObject(17951, tonumber(x)+4.22, tonumber(y)+1.05, tonumber(z)-0.25, tonumber(rot1), tonumber(rot2), tonumber(rot3)) 
attachElements(gate, garage) 

 

 

Posted

Have a look to attachElements arguments

        local garage = createObject(17950, tonumber(x), tonumber(y), tonumber(z), tonumber(rot1), tonumber(rot2), tonumber(rot3)) 
        local gate = createObject(17951, tonumber(x)+4.22, tonumber(y)+1.05, tonumber(z)-0.25, tonumber(rot1), tonumber(rot2), tonumber(rot3)-90) 
        attachElements ( gate, garage, 4.22, 1.05,-0.25, 0, 0, -90) 

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