SR2 A script from SR The Third to SR 2

Hello

Some time ago I asked for a script to make police officers shoot out of their patrolcars at notoriety level 3 in Saints Row The Third.

This is the thread:
http://www.saintsrowmods.com/forum/threads/npcs-shoot-out-of-car.2664/

Tulip.sniper and IdolNinja helped me out and gave me a script which indeed made the cops fire from their vehicles, for which I'm still very gratefull ;)

However, now that I've gotten into Saints Row 2 I was wondering if the script from mentioned thread could be edited to work in Saints Row 2? I have the SR2_city.lua and tried the script (might sound stupid, but if you don't try, you can't know) which, to my expectations, didn't work. But I don't know what codes SR2 would use for this.

If this could be accomplished, that would be great :D
 
There should be the following line inside the sr3_city_main() function:
Code:
thread_new("sr3_city_thread_cops_shooting_out_windows")

After a few tries, I managed to place the script and you code line in the right order :p Works like a charm now.

Thank you.

EDIT:

I was looking at the page that was linked in IdolNinja his post and I found this line: 'player_is_in_vehicle'

So I replaced the 'mission_is_active' with that line, because I don't mind the script being active during missions.

This however didn't work. Is the 'player in vehicle' line for other purposes? I was expecting cops to shoot me while on foot and not when I'm in a vehicle, because the script really looks like its supposed to do that, but instead the police just kept shooting me.

I don't mind this offcoarse :p but that line from that page did got me curious though ;)
 
Last edited:
Replace:
Code:
if (mission_is_active() == false) then
with:
Code:
if (not player_is_in_vehicle("#PLAYER1#") ) then

The cops will shoot you from their vehicles only when you are on foot if you do this.
 
Nope man, that doesn't do it :/

But, it doesn't matter, if it can't be done thats okay, my original request has been handled so I'm happy ;)

Thanks for the help.
 
Back
Top