aStiffSausage Posted June 19, 2011 Share Posted June 19, 2011 (edited) Ok, so I got no idea if this one's done before, but I'm trying to make Anti-lock Brake System (ABS) for GTA:SA. I've thought the mecanism to be like this: IfPlayer pressed keyABS De-activedIfPlayer in car and brakingWheels lockedThenDecrease braking force Pretty simplified version? Script isn't going to be easy, at least not for me, as I didn't find anything related to locked wheels, on opcodes. Maybe memory reading is needed? And other thing: How I can check if vehicle lights are on/off, and how I can disable/enable them? Only reason I want to make ABS is the fact that in SA, you need to adjust it from handlings. But you need to set braking force to really low if you don't want your wheels to lock up while braking, especially while turning. I thought decreasing braking force might be working solution, as it would decrease it by need, for example if your wheels lock, it will decrease braking force by 0.1, if still locked, then decrease more, and when wheels no more lock, it would be returned to normal, with a little delay so you won't be immediatly locking up your wheels Or possibly slowly recovering braking force to original? I don't know EDIT: Got light-problem fixed, now I've made script all by myself that disables/enables engine and lights (I know, hundreds of mods that are same kind of) EDIT #2: Still need a bit help with lights, how I can check if car has lights on/off? Edited June 19, 2011 by oksa8 Link to comment Share on other sites More sharing options...
fastman92 Posted June 20, 2011 Share Posted June 20, 2011 To check if car has lights on/off: 0A97: [email protected] = car [email protected] struct [email protected] += 1412 0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0 [email protected] is car handle, [email protected] is car struct adress. [email protected] becomes state of lights. [email protected] is 1/0 Link to comment Share on other sites More sharing options...
aStiffSausage Posted June 20, 2011 Author Share Posted June 20, 2011 To check if car has lights on/off: 0A97: [email protected] = car [email protected] struct [email protected] += 1412 0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0 [email protected] is car handle, [email protected] is car struct adress. [email protected] becomes state of lights. [email protected] is 1/0 Thank you a lot, going to try it Well still got few problems... ABS, possible to check if wheel is spinning or locked? Link to comment Share on other sites More sharing options...
Bad.boy! Posted June 20, 2011 Share Posted June 20, 2011 (edited) I think creating a new engine is something for you, because all those things you want to do are almost impossible and if you manage to do it, the game will probably be very buggy Edited June 20, 2011 by Bad.boy! Link to comment Share on other sites More sharing options...
aStiffSausage Posted June 20, 2011 Author Share Posted June 20, 2011 I think creating a new engine is something for you, because all those things you want to do is almost impossible and if you manage it is probably very buggy Yeah, I knew that it would become more complicated when found nothing related to locked tires on opcodes... But, old game, everything can't be done. Link to comment Share on other sites More sharing options...
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