'LinKin Posted March 13, 2014 Posted March 13, 2014 Hello, How can I know whether a vehicle is upside-down or not? getElementRotation? This is what I get from getElementRotation, Y and Z are different while X wouldn't matter. North: http://postimg.org/image/5z0ifub8t/ South: http://postimg.org/image/fm8m3atm5/ West: http://postimg.org/image/f82opyk4t/ East: http://postimg.org/image/5xqkmf9f1/ Has anyone made a function to return if the vehicle is upside-down? If not, I think it'd be useful if someone did it. Thanks, - LinKin. Need a clanwar script? Click here! Do you want some free scripts for your DD server? Visit my website.
Castillo Posted March 13, 2014 Posted March 13, 2014 viewtopic.php?f=91&t=30369&p=329863&hilit=upside+down#p329863 Maybe that can help? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
'LinKin Posted March 13, 2014 Author Posted March 13, 2014 Thanks. It's working, but let's say not 100% When your car is upside down or is likely to be, it gets on fire. That script works just if really it is upsidedown, but, if you're on these positions: http://postimg.org/image/h67kc9xlb/ or http://postimg.org/image/zdzszfbdb/ It doesn't show it's upsidedown, but still, it will get on fire. http://postimg.org/image/4q0qi0ne5/ Need a clanwar script? Click here! Do you want some free scripts for your DD server? Visit my website.
arezu Posted March 13, 2014 Posted March 13, 2014 Thanks. It's working, but let's say not 100%When your car is upside down or is likely to be, it gets on fire. That script works just if really it is upsidedown, but, if you're on these positions: http://postimg.org/image/h67kc9xlb/ or http://postimg.org/image/zdzszfbdb/ It doesn't show it's upsidedown, but still, it will get on fire. http://postimg.org/image/4q0qi0ne5/ If you read the code, you can clearly see it has a variable to change the threshold: local UPSIDE_DOWN_THRESHOLD = math.cos(math.rad(20)) Set a higher value like 80 and try again.
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