Dretax Posted July 9, 2017 Share Posted July 9, 2017 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. Link to comment
#BrosS Posted July 9, 2017 Share Posted July 9, 2017 getElementsByType -- Loop / "vehicle" Link to comment
Dretax Posted July 9, 2017 Author Share Posted July 9, 2017 (edited) 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 July 9, 2017 by Dretax Link to comment
#BrosS Posted July 9, 2017 Share Posted July 9, 2017 3 minutes ago, Dretax said: That wouldn't lead me to check if a DOOR, or anything is broken on a vehicle.. getElementHealth :3 Link to comment
Swagy Posted July 9, 2017 Share Posted July 9, 2017 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. Link to comment
#BrosS Posted July 9, 2017 Share Posted July 9, 2017 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 Link to comment
Dzsozi (h03) Posted July 9, 2017 Share Posted July 9, 2017 (edited) You can try using getVehiclePanelState Edited July 9, 2017 by Dzsozi (h03) 1 Link to comment
Swagy Posted July 9, 2017 Share Posted July 9, 2017 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? 2 Link to comment
Dretax Posted July 9, 2017 Author Share Posted July 9, 2017 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. Link to comment
kieran Posted July 9, 2017 Share Posted July 9, 2017 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 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! 1 Link to comment
Dretax Posted July 9, 2017 Author Share Posted July 9, 2017 (edited) 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 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 July 9, 2017 by Dretax 1 Link to comment
kieran Posted July 9, 2017 Share Posted July 9, 2017 Haha, well you're much better than me then still my first month on lua.... Anyways, hope you manage to get your script working, it sounds like it will be awesome finished! 1 Link to comment
Dretax Posted July 9, 2017 Author Share Posted July 9, 2017 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. 2 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now