savidge Posted January 19, 2014 Share Posted January 19, 2014 Hello, I wanted to know if it's possible to make all land vehicles in San Andreas have the same traffic AI as the police department vehicles. For instance, in places like Mulholland, the vehicles' wheels "hover" off the ground sometimes because it's a hilly road on a slant, whereas if a police vehicle were to drive up the same hilly road, it would have all four wheels on the ground and it would behave the same way as if CJ was driving it himself. If anybody knows how to do this either via SCM editing or via CLEO, it'd be much appreciated. Thanks for reading Snoops27 1 Link to comment Share on other sites More sharing options...
Jeansowaty Posted January 19, 2014 Share Posted January 19, 2014 Didn't know that the AI behaves differently depending on the area. Well I noticed one change, the cars on highways were driving so f********g fast that one hispanic w***e just pushed me once with her Nebula, I had full health, and I died. savidge 1 Link to comment Share on other sites More sharing options...
savidge Posted January 19, 2014 Author Share Posted January 19, 2014 Didn't know that the AI behaves differently depending on the area. Well I noticed one change, the cars on highways were driving so f********g fast that one hispanic w***e just pushed me once with her Nebula, I had full health, and I died. Yeah, that's another thing. I managed to find some script that edits the highway traffic nodes so that they slow down a fair bit, but what also bugs me is that they exit on the outside lane a lot. I've had too many car wrecks to recall because of this Snoops27 1 Link to comment Share on other sites More sharing options...
madleg Posted January 19, 2014 Share Posted January 19, 2014 here's my old script, what is actually unfinished (it have a lot of problems, and im too lazy to finish it) {$CLEO}0000:0A96: [email protected] = actor $PLAYER_ACTOR structwhile true wait 0 0A8D: [email protected] = read_memory 0xB74494 size 4 virtual_protect 0 [email protected] += 0x4 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 for [email protected] = 0 to 27904 step 0x100 0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0 000A: [email protected] += 0x1 005A: [email protected] += [email protected] 0A97: [email protected] = car [email protected] struct [email protected] += 1192 0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0 if not [email protected] == 3 then [email protected] += 236 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 if [email protected] < 2 then [email protected] -= 308 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 if and [email protected] > 0 803B: [email protected] == [email protected] // (int) then if 8975: car [email protected] emergency_vehicle then [email protected] -= 169 0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0 [email protected] += 3 0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset 0.0 0.0 0.0 car.DriveTo([email protected], [email protected], [email protected], [email protected]) 0A8C: write_memory [email protected] size 1 value 1 virtual_protect 0 [email protected] += 238 0A8C: write_memory [email protected] size 1 value 3 virtual_protect 0 [email protected] -= 239 0209: [email protected] = random_int_in_ranges 0 10 if [email protected] < 9 then 0A8C: write_memory [email protected] size 1 value 0 virtual_protect 0 else 0A8C: write_memory [email protected] size 1 value 5 virtual_protect 0 end [email protected] -= 1 0A8C: write_memory [email protected] size 1 value [email protected] virtual_protect 0 end end end end endend savidge 1 Link to comment Share on other sites More sharing options...
savidge Posted January 19, 2014 Author Share Posted January 19, 2014 here's my old script, what is actually unfinished (it have a lot of problems, and im too lazy to finish it) Thanks man, this is just what I was looking for! I don't know what you mean by "problems" but I have only one flaw to point out -- some vehicles try to overtake others at red lights and end up waiting for the red light on the other side of the road. Other than that, this script is brilliant! Snoops27 1 Link to comment Share on other sites More sharing options...
madleg Posted January 29, 2014 Share Posted January 29, 2014 some vehicles try to overtake others at red lights and end up waiting for the red light on the other side of the road. i just wanted to randomize AI )) anyway here's a small "lazy update". just ctrl+c ctrl+v all traffic part of CCarCtrl in each struct, i hope this one will fix all issues without crashes. also, if you know some unused addresses in carstruct, u can replace bomb address, what im using as mark {$CLEO}0000:0A96: [email protected] = actor $PLAYER_ACTOR structwhile true wait 0 0A8D: [email protected] = read_memory 0xB74494 size 4 virtual_protect 0 [email protected] += 0x4 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 for [email protected] = 0 to 27904 step 256 0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0 000A: [email protected] += 1 if and 0029: [email protected] >= 0x00 001B: 128 > [email protected] then 005A: [email protected] += [email protected] 0A97: [email protected] = car [email protected] struct [email protected] += 1192 0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0 if not [email protected] == 3 then [email protected] += 236 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 if [email protected] < 2 then [email protected] -= 308 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 if and [email protected] > 0 803B: [email protected] == [email protected] // (int) then if 8975: car [email protected] emergency_vehicle then 0A97: [email protected] = car [email protected] struct 0A8E: [email protected] = [email protected] + 0x390 0AC6: [email protected] = label @_test offset for [email protected] = 0 to 37 step 1 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 [email protected] += 4 0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 0 [email protected] += 4 end car.DriveTo([email protected], 0.0, 0.0, 0.0) 0A8E: [email protected] = [email protected] + 0x390 0AC6: [email protected] = label @_test offset for [email protected] = 0 to 37 step 1 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 [email protected] += 4 0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 0 [email protected] += 4 end 0A8E: [email protected] = [email protected] + 1192 0A8C: write_memory [email protected] size 1 value 3 virtual_protect 0 end end end end end endend:_testhex00 00 00 00 00 00 00 0000 00 00 00 00 00 00 0000 00 00 00 00 00 00 0000 00 00 00 00 00 00 0000 00 00 00 00 00 00 0000 00 00 00 00 00 00 0000 00 00 00 00 00 00 0000 00 00 00 00 00 00 0000 00 00 00 00 00 00 0000 00 00 00 00 00 00 0000 00 00 00 00 00 00 0000 00 00 00 00 00 00 0000 00 00 00 00 00 00 0000 00 00 00 00 00 00 0000 00 00 00 00 00 00 0000 00 00 00 00 00 00 0000 00 00 00 00 00 00 0000 00 00 00 00 00 00 0000 00 00 00 00 00 00 0000 00 00 00 end btw, saw the func CCarSwithphysicstonormal or something like this, maybe later i will see what it can do Link to comment Share on other sites More sharing options...
savidge Posted January 29, 2014 Author Share Posted January 29, 2014 i just wanted to randomize AI )) anyway here's a small "lazy update". just ctrl+c ctrl+v all traffic part of CCarCtrl in each struct, i hope this one will fix all issues without crashes. also, if you know some unused addresses in carstruct, u can replace bomb address, what im using as mark btw, saw the func CCarSwithphysicstonormal or something like this, maybe later i will see what it can do Wow, this is brilliant! Yep, it works fine without any crashing issues as well, you should release this on the Mod Showroom or something, I bet loads of people would want this. Thanks again, feel free to contribute more if you've found something worth mentioning Snoops27 1 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