|
 |
|
|
|
|
|
Attention:
|
The Mod Showroom is only for posting previews/downloads of completed or near finished mods. All help topics should be posted in the Editing Discussion forums. Help topics and mod requests posted here will be locked or binned. Thank you.
|
|
GTAGarage.com : Free mod hosting, attach your files and screenshots to your topics
GTAModding.com : A wiki for everything related to GTA modding, including documentation and tutorials
|
[CLEO]Realistic Traffic! (no more floating nor overspeeding traffic!!)+FREECARAIM!
 |
|
 |
| |
toonskull  |
|
Necromancer

Group: Members
Joined: Aug 4, 2009

|
Well it hasn't been 24 yet but I figure it hasn't crashed mine. Notes: This is the only CLEO mod I ran on my system so no promises it won't have conflicts with other mods running. This version has doors locked but if you read through my comments you can see how to swap it for car health. I set my distance to 60.0 meters because it felt right. I found setting it higher fewer cars get selected. While setting it lower makes for more accidents. | CODE | {$VERSION 3.1.0027} {$CLEO .cs}
//-------------MAIN--------------- thread 'REALTRAFFIC' //Based on HippieCommunist version 2008 - 2010. //Recoded by Vincent Black aka ToonSkull //June 5th, 2010 :REALTRAFFIC_19 wait 0 //Grab any vechicles near player 04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0 073E: get_car_in_sphere 1@ 2@ 3@ radius 60.0 model -1 handle_as 0@ //Car Info if 056E: car 0@ defined jf @REALTRAFFIC_19 //Driver Info 046C: 1@ = car 0@ driver if 056D: actor 1@ defined jf @REALTRAFFIC_19 if not Actor.DrivingPoliceVehicle(1@) jf @REALTRAFFIC_19 //This is a cool way to figure out which cars are modified. Just Lock the doors. //See notes if you don't like this option. //4@ = Car.Health(0@) 09B3: get_car 0@ door_status 4@ 089F: get_actor 1@ pedtype_to 3@ //No mods, bikes, Criminals, or Cops if and not 4@ >= 3 //Doors are locked = car is already modded - ALT is "4@ == 1000" not 3@ == 6 //Is a Cop not 3@ == 20 //Is a Criminal 847A: not actor 1@ driving_bike jf @REALTRAFFIC_19 03F3: get_car 0@ primary_color_to 11@ secondary_color_to 12@ 5@ = Car.Model(0@) 6@ = Car.Angle(0@) 02E3: 7@ = car 0@ speed //Get the driver 0665: get_actor 1@ model_to 2@ 0407: store_coords_to 8@ 9@ 10@ from_car 0@ with_offset 0.0 0.0 0.0 Actor.RemoveReferences(1@) //Car Capacity Check 13@ = 0 14@ = 0 15@ = 0 01EA: 22@ = car 0@ max_passengers //Two Door Check if 22@ == 3 jf @REALTRAFFIC_404 //Four Door Check Rear Seats //Rear Seat passenger if 8431: not car 0@ passenger_seat_free 2 jf @REALTRAFFIC_355 0432: 16@ = get_actor_handle_from_car 0@ passenger_seat 2 0665: get_actor 16@ model_to 13@ 089F: get_actor 16@ pedtype_to 19@ Actor.RemoveReferences(16@) //Rear Seat passenger :REALTRAFFIC_355 if 8431: not car 0@ passenger_seat_free 1 jf @REALTRAFFIC_404 0432: 17@ = get_actor_handle_from_car 0@ passenger_seat 1 0665: get_actor 17@ model_to 14@ 089F: get_actor 17@ pedtype_to 20@ Actor.RemoveReferences(17@) //Front Seat Passenger :REALTRAFFIC_404 if 8431: not car 0@ passenger_seat_free 0 jf @REALTRAFFIC_453 0432: 18@ = get_actor_handle_from_car 0@ passenger_seat 0 0665: get_actor 18@ model_to 15@ 089F: get_actor 18@ pedtype_to 21@ Actor.RemoveReferences(18@)
:REALTRAFFIC_453 Car.Destroy(0@) 0@ = Car.Create(5@, 8@, 9@, 10@) Car.Angle(0@) = 6@ //This line was used for testing it turns the cars black //Not all the cars turn black as I approach them so it still needs tweaking. //0229: set_car 0@ primary_color_to 0 secondary_color_to 0 0229: set_car 0@ primary_color_to 11@ secondary_color_to 12@ 0129: 1@ = create_actor_pedtype 3@ model 2@ in_car 0@ driverseat //Place passengers (if any) if not 13@ == 0 jf @REALTRAFFIC_559 01C8: 16@ = create_actor_pedtype 19@ model 13@ in_car 0@ passenger_seat 2 0526: set_actor 16@ stay_in_car 1 Model.Destroy(13@) Actor.RemoveReferences(16@)
:REALTRAFFIC_559 if not 14@ == 0 jf @REALTRAFFIC_610 01C8: 17@ = create_actor_pedtype 20@ model 14@ in_car 0@ passenger_seat 1 0526: set_actor 17@ stay_in_car 1 Model.Destroy(14@) Actor.RemoveReferences(17@)
:REALTRAFFIC_610 if not 15@ == 0 jf @REALTRAFFIC_661 01C8: 18@ = create_actor_pedtype 21@ model 15@ in_car 0@ passenger_seat 0 0526: set_actor 18@ stay_in_car 1 Model.Destroy(15@) Actor.RemoveReferences(18@) //Set behaviors :REALTRAFFIC_661 Car.SetSpeedInstantly(0@, 7@) Car.SetToNormalDriver(0@) Car.SetDriverBehaviour(0@, FollowRoad) 00AE: set_car 0@ traffic_behaviour_to 1 //Lock the doors - some players don't like this option so it could be //written to use Car.Health(0@) and just add 1 point so car health is not normal. //4@ += 1 //Car.Health(0@) = 4@ Car.DoorStatus(0@) = 3 04E0: car 0@ abandon_path_radius 0 Model.Destroy(5@) Model.Destroy(2@) Actor.RemoveReferences(1@) Car.RemoveReferences(0@) jump @REALTRAFFIC_19
|
Thanks Hippie for setting code out there. This post has been edited by toonskull on Sunday, Jun 6 2010, 17:15
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
toonskull  |
|
Necromancer

Group: Members
Joined: Aug 4, 2009

|
| QUOTE (methodunderg @ Jun 6 2010, 23:11) | I will have a test of this later, and get back to you on it ! Hopefully it doesn't conflict with my other CLEO's i have installed.
I don't really understand cleo, so what where you tryin' to achieve with this edit ? just so I know exactly what to look out for 
Cheers mate | Add the passengers back into the vehicles. Hippie's last mod link was like a step backwards in the fact that it removed the passengers from the vehicles. Also if you read the comments inside the code it allows you to change the doors being locked to unlocked. IF "thread 'REALTRAFFIC'" is on line number 0005 here are the lines to change for those. | CODE | 0028 4@ = Car.Health(0@) 0029 //09B3: get_car 0@ door_status 4@
0033 4@ == 1000
0126 4@ += 1 0127 Car.Health(0@) = 4@ 0128 //Car.DoorStatus(0@) = 3 |
Making changes to those lines without the line numbers of course will make the cars 1 point stronger instead of locking the doors. -----------Now for something you said earlier------------- | QUOTE | | if you commited a crime, and no cops where around, a random ped near you, would use there cellphone to ring the police (a short text convo will appear at the bottom) the ped will also have a arrow/icon above there head so you know which ped is calling the cops, and if you shoot that ped before convo over, then no stars are received. |
Well I omitted the cell phone thing and give you this: | CODE | {$VERSION 3.1.0027} {$CLEO .cs} //This mod hooks the wanted level and checks for cops within 100 feet of the player. //Coded by Vincent Black //June 6th, 2010 //-------------MAIN--------------- thread 'RCOPCARS' //Load Wanted Level into variable 1@ :RCOPCARS_19 wait 0 1@ = Player.WantedLevel($PLAYER_CHAR) if 1@ > 0 jf @RCOPCARS_19 Player.ClearWantedLevel($PLAYER_CHAR) 10@ = 0 //Set a counter to zero in 10@ :RCOPCARS_61 wait 0 04C4: store_coords_to $4 $5 $6 from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0 08E5: get_actor_in_sphere $4 $5 $6 radius 30.0 handle_as 3@ if not 10@ >= 100 jf @RCOPCARS_19 10@ += 1 //Stop scanning after 100 loops assume no one saw anything. if 056D: actor 3@ defined jf @RCOPCARS_61 089F: get_actor 3@ pedtype_to 5@ if or 5@ == 4 5@ == 5 5@ == 6 jf @RCOPCARS_61 //We have a witness. //Set timer to zero. 32@ = 0 if not 5@ == 6 jf @RCOPCARS_241 //Witness Marker 12@ = Marker.CreateAboveActor(3@) 07E0: set_marker 12@ type_to 0 Marker.SetColor(12@, 0)
:RCOPCARS_241 wait 0 if Actor.Dead(3@) jf @RCOPCARS_273 //Killed the Witness. Marker.Disable(12@) jump @RCOPCARS_19
:RCOPCARS_273 if or 32@ >= 30000 //30 seconds to kill the witness 5@ == 6 //Witness is a cop so timer don't matter. jf @RCOPCARS_241 //Reset Wanted Level stored in 1@ Player.WantedLevel($PLAYER_CHAR) = 1@ if not 5@ == 6 jf @RCOPCARS_307 Marker.Disable(12@) //Loop here until Wanted Level is cleared. :RCOPCARS_307 wait 0 1@ = Player.WantedLevel($PLAYER_CHAR) if 1@ == 0 jf @RCOPCARS_307 jump @RCOPCARS_19
|
Like you said, this grabs the wanted level and stores it. Then it scans 30 meters (about 100 feet) around you for any cops or civilians (gangs don't narc). You will still hear a report but no stars. At this point look for a red marker on your radar. That person is running for help. Then if you can kill them in 30 seconds you will still have no stars. If the witness is a cop the stars will apply and the mod waits for you to clear them. Have FUN!
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
methodunderg  |
|
Grandpa

Group: Members
Joined: May 23, 2008


|
WOW !!! Is all I can say .. That script is dope ! I'm able to run around killing HEAPS of people, and only get WANTED when a cop actually sees me. (I've only tested this on a cop ped, not on bike or car, I'm sure it will work the same though) I tested it only for ten minutes. But will continue to play after this and update the post if I find anything. I noticed that sometimes the 'witnesses' are in vehicles .. Which makes it quite hard, but I guess .. Realistic ! Which is what we are after .. Could you add in, when a witness is 'detected' that you write a comment down the bottom saying "You have left a witness behind. You have ## seconds to eliminate them" And have the ## counting down. Awesome work on that one ! Tested that traffic edit as well. (Only the locked version) Every car was locked. Can I edit it the same way as the original with the 'wait 0' at the start so that only SOME of the vehicles are locked ? Also, the taxi cleo that was created with this traffic mod doesn't seem to work with your edit either. I don't personally care though, that taxi script isn't the greatest  The driver himself sucks. Other people might still use it though .. Ive been playin' with Rapier's 2.4 Taxi Cleo (just found it earlier, was using James' buggy 1.2) Thanks dude ! Your the best !
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Pages:
(7) « First ... 5 6 [7]
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
| |
 |
|
 |
|
|
|
|