Jump to content

[HELP] Attached object question


Recommended Posts

Posted

Hey, so I am attaching an object to a vehicle, and when the vehicle changes interior or dimension, the object doesn't follow the vehicle. I tried onClientPreRender but it drops my FPS to 1 or 2... So it is something wrong with it.

So, what can I do to make the attached object follow the vehicle when it changes interior or/and dimension?

Thank you.

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

Firstly I'd try to get object's interior and dimension after moving the vehicle to another interior/dimension, in order to check if it's in the same interior/dimension of the vehicle.

My nickname ingame: B#Crackz~

Do NOT ask me for help via PM about anything related to scripting. There are forums for that.

Posted
Firstly I'd try to get object's interior and dimension after moving the vehicle to another interior/dimension, in order to check if it's in the same interior/dimension of the vehicle.

Duh.. that was the idea in the first place. But there is no event like "onElementDimensionChange". I don't want to have a timer for that, as it takes up the server's resources and also may cause lag or network trouble...

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

What are you using the change the vehicles dimension or interior.

If possible you can add a function to it that gets the elements attached to the vehicle, and changes their dimension / interiors to.

Wolf Inc Discord

Youtube channel
Github

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