Sign in to follow this  
Dretax

Get All broken components of a vehicle?

Recommended Posts

Is there an actual way to get ID and health of the vehicle components? I would like to save the broken parts on disconnection.

Cheers.

Share this post


Link to post
3 hours ago, #BrosS said:

getElementsByType -- Loop / "vehicle"

 

That wouldn't lead me to check if a DOOR, or anything is broken on a vehicle..

Edited by Dretax

Share this post


Link to post
3 minutes ago, Dretax said:

That wouldn't lead me to check if a DOOR, or anything is broken on a vehicle..

getElementHealth

:3

Share this post


Link to post
6 minutes ago, #BrosS said:

getElementHealth

:3

and what's the damned element? he wants a vehicle part not a :Oing element, open your brain, I think it's not possible, try using wiki.

Share this post


Link to post
25 minutes ago, UDC said:

and what's the damned element? he wants a vehicle part not a :Oing element, open your brain, I think it's not possible, try using wiki.

why don't you try

he asked how to get broken vehicles so i did

Share this post


Link to post
6 hours ago, Dretax said:

Is there an actual way to get ID and health of the vehicle components? I would like to save the broken parts on disconnection.

Cheers.

can't you see it?

  • Like 2

Share this post


Link to post
48 minutes ago, Dzsozi (h03) said:

You can try using


getVehiclePanelState

 

Correct answer.

Returns an int indicating the state of the specified the panel. This is a value between 0 and 3, with 0 indicating the panel is undamaged and 3 indicating it is very damaged.

Share this post


Link to post

Amazingly, I know the functions you are looking for, but not how to make the script haha, so first of all you want getVehiclePanelState as mentioned above, but ALSO, you may want to try getVehicleLightState.

I'll explain these a bit further, the panel state one gets doors, bumpers, all the metal on your car basically :D but the light state will allow you to check if your lights have been broken or if they are working, you then will want to use setVehiclePanelState and setVehicleLightState once you save the information somewhere (xml file or database, account data strings are not recommended) 

The script you want is a little above my understanding (for now) but the wiki sort of explains it ^.^ hope this helps!

  • Like 1

Share this post


Link to post
20 minutes ago, kieran said:

Amazingly, I know the functions you are looking for, but not how to make the script haha, so first of all you want getVehiclePanelState as mentioned above, but ALSO, you may want to try getVehicleLightState.

I'll explain these a bit further, the panel state one gets doors, bumpers, all the metal on your car basically :D but the light state will allow you to check if your lights have been broken or if they are working, you then will want to use setVehiclePanelState and setVehicleLightState once you save the information somewhere (xml file or database, account data strings are not recommended) 

The script you want is a little above my understanding (for now) but the wiki sort of explains it ^.^ hope this helps!

Yeah, already mentioned above that someone linked It.

I'm sorta a veteran "engineer" (Still on BSC), thanks for the explanation even though It wasn't necessary :)

Thanks for the vehiclelightstate though, that was forgotten.

Cheers.

Edited by Dretax
  • Like 1

Share this post


Link to post

Haha, well you're much better than me then xD still my first month on lua....  Anyways, hope you manage to get your script working, it sounds like it will be awesome finished! :P 

  • Like 1

Share this post


Link to post

Your first? Let me know if you are in need of logical solutions that you are not able to solve. I started It 2 months ago, but I have the advantage due to the multiple programming language experience.

Anyway, good night, thanks once more.

  • Like 2

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.