Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    2. News

    1. Red Dead Redemption 2

    1. GTA Online

      1. After Hours
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

Sign in to follow this  
psychedelist

[GTA SA] Make police chase a ped

Recommended Posts

psychedelist

Title seems like it would be a popular task/request, yet I couldn't find a working solution, i hope someone can help.

 

Sometimes we can see a cop car chasing a car with peds doing a drive-by on their followers. Or we can observe how a random car clashes with a cop car, the cop car turns siren on, the cop exists, drags the driver out, shoots them, then moves on. These two examples are probably different things in terms of how they're implemented in game, the second scenario is probably more of what i need. I want cops to react like this to the criminals on vigilante mission.

 

I check if vigilante mission is active by manually setting a cleo variable from copcar thread. Criminals are created with pedtype 24. Here's what i tried.

 

1. 09B6: set_char_wanted_by_police [email protected] to 1 , inside copcar thread ped initialization. Does nothing (cops never reacted, regardless if they or criminals are on foot or in car).

 

2. 0746: set_acquaintance 4 of_actors_pedtype 6 to_actors_pedtype 24 , on vigilante mission initialization in copcar thread.

 

Also, using data from here and here,

 

in my custom script,

 

before loop:

060A: create_decision_maker_type 1 store_to [email protected]
0709: set_decision_maker [email protected] on_event 36 task 1105 respect 0.0 hate 0.0 like 0.0 dislike 0.0 in_car 1 on_foot 1

 

inside loop (goes through all cops manually found around the player):

077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 24
060B: set_actor [email protected] decision_maker_to [email protected]

 

Also tried tasks 103, 104, 729, 1103. At least one of them made cops on foot attempt to shoot or drag out the target, but cops inside cars never reacted.

 

I guess i'll end up emulating cop behavior myself, but it would be much nicer to reuse the already existing cop behavior towards "criminals" who happen to bump into (or get bumped by) cop cars. Does anyone know how to get this to work? Am i doing something wrong in my examples?

 

Somewhat related, currently i'm performing a lot of ped-related things on each iteration of the loop, and many of those things would better be done only once, on ped initialization. Does anyone know any unused address in ped struct, so that i could store a flag in it to avoid unnecessary procedures on each loop iteration?

Share this post


Link to post
Share on other sites
Sanmodder

Title seems like it would be a popular task/request, yet I couldn't find a working solution, i hope someone can help.

 

Sometimes we can see a cop car chasing a car with peds doing a drive-by on their followers. Or we can observe how a random car clashes with a cop car, the cop car turns siren on, the cop exists, drags the driver out, shoots them, then moves on. These two examples are probably different things in terms of how they're implemented in game, the second scenario is probably more of what i need. I want cops to react like this to the criminals on vigilante mission.

 

I check if vigilante mission is active by manually setting a cleo variable from copcar thread. Criminals are created with pedtype 24. Here's what i tried.

 

1. 09B6: set_char_wanted_by_police to 1 , inside copcar thread ped initialization. Does nothing (cops never reacted, regardless if they or criminals are on foot or in car).

 

2. 0746: set_acquaintance 4 of_actors_pedtype 6 to_actors_pedtype 24 , on vigilante mission initialization in copcar thread.

 

Also, using data from here and here,

 

in my custom script,

 

before loop:

060A: create_decision_maker_type 1 store_to

0709: set_decision_maker on_event 36 task 1105 respect 0.0 hate 0.0 like 0.0 dislike 0.0 in_car 1 on_foot 1

 

inside loop (goes through all cops manually found around the player):

077A: set_actor acquaintance 4 to_actors_pedtype 24

060B: set_actor decision_maker_to

 

Also tried tasks 103, 104, 729, 1103. At least one of them made cops on foot attempt to shoot or drag out the target, but cops inside cars never reacted.

 

I guess i'll end up emulating cop behavior myself, but it would be much nicer to reuse the already existing cop behavior towards "criminals" who happen to bump into (or get bumped by) cop cars. Does anyone know how to get this to work? Am i doing something wrong in my examples?

 

Somewhat related, currently i'm performing a lot of ped-related things on each iteration of the loop, and many of those things would better be done only once, on ped initialization. Does anyone know any unused address in ped struct, so that i could store a flag in it to avoid unnecessary procedures on each loop iteration?

 

I do not know you checked it

this is the code of aggressive drivers

police officers

They will have

too busy

 

0A8C: write_memory 0x96914F size 4 value 1 virtual_protect 1

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.