Jump to content

Draw outline around vehicle engine


Recommended Posts

My goal is draw outline around the vehicle's engine when the hood is open but I don't know it's possible to do or not... of course there are modded vehicles not default ones.

I know I need to open the vehicle's hood with SetVehicleDoorState but how can I draw the outline around the engine? is there any function to get the engine position for each vehicles or I need to calculate it manually? and then I can use the DxDrawLine function or which one?

By outline I mean like this, but around the engine:

WVE3f.jpeg

Edited by thund3rbird23
Link to comment

Yeah, I know about these functions. But some server did it already they're just "highlighted" the engine for example when you are a mechanic and you are repair the engine then it's like the engine is "glowing", "highlighted" or I dont know which word can describe 😅

Edited by thund3rbird23
Link to comment
  • 2 weeks later...

It's a custom object, if you want to achieve similar effect, you'd need create or get an engine model, put it into MTA, then attach it to the vehicle (cause there's no engine as an object natively), the engine position can be retrieved by getVehicleDummyPosition with "engine" as a second argument. I assume you know how to use shader to outline the object.

Edited by Przemcio
  • Like 1
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...