Jump to content

New police-car


aStiffSausage

Recommended Posts

aStiffSausage

So, I'm trying to make new police car to GTA:SA. I've modded Super GT to Pagani Zonda F, and I have Police-paintjob for it, but how can I make it spawn also as police car while using the paintjob?

 

I mean like this: Super GT would spawn as normal car, but sometimes there would spawn Super GT which would be controlled by Police-NPC's, and they would act just like polices do in SA. Just with different car.

 

 

It also crashes when I load game... I can only see zone-name and then it crashes tounge2.gif

 

It would be nice if someone could help me...

 

EDIT: Removed useless & long code turn.gif

Edited by oksa8
Link to comment
Share on other sites

The police cars are defined in the games engine, which makes it impossible to define more police cars as the game defines...yet.

 

And the script needs an end tounge.gif

 

As soon as the script engine reaches the end the game will crash, since it reached some 'undefined' areas. Thus you need either a 0a93 or a loop in the end. Also you should add several checks but the script will never do what you want it to do, sorry.

 

Cheers

Link to comment
Share on other sites

aStiffSausage

 

The police cars are defined in the games engine, which makes it impossible to define more police cars as the game defines...yet.

 

And the script needs an end tounge.gif

 

As soon as the script engine reaches the end the game will crash, since it reached some 'undefined' areas. Thus you need either a 0a93 or a loop in the end. Also you should add several checks but the script will never do what you want it to do, sorry.

 

Cheers

So basically that script has failed? biggrin.gif

 

 

And check this: http://www.gtagarage.com/mods/show.php?id=8207

 

A bit like that, but instead of random cars/peds it would spawn only Super GT and some specific police-ped.

 

And I try some loop to the end biggrin.gif

 

 

EDIT: Added loop. Doesn't crash. But causes unbelievable lagg... Maybe it shouldn't spawn new car to same position after 100ms... biggrin.gif

 

EDIT #2: Removed useless & long code turn.gif

Edited by oksa8
Link to comment
Share on other sites

It should be possible to do in similar way how I did Cop Bikers Overhaul mod. That means that you need SOME skills to do it stable etc.

 

You can always emulate it via script, but it won't be the same.

Link to comment
Share on other sites

aStiffSausage

 

It should be possible to do in similar way how I did Cop Bikers Overhaul mod. That means that you need SOME skills to do it stable etc.

 

You can always emulate it via script, but it won't be the same.

Did a little check on the source of your script... And I have to say, that I think I'll be asking from Mod request thread biggrin.gif

 

 

Took me long to understand how speedometer works, but I think it'll take too long to learn hex-coding and stuff. mercie_blink.gifconfused.gif

 

BUT I'll try to mess something and hope for the best smile.gif

Link to comment
Share on other sites

aStiffSausage

EDIT: Nevermind, I might be trying to use Cop Bikers-mod as base... If I get it work, can I get permission for releasing it (with credits of course)? turn.gif

Edited by oksa8
Link to comment
Share on other sites

EDIT: Nevermind, I might be trying to use Cop Bikers-mod as base... If I get it work, can I get permission for releasing it (with credits of course)? turn.gif

To be honest, it's a VERY advanced script. But yeah, you can use it. Don't try to ask me how it works though tounge2.gif

Link to comment
Share on other sites

oK good hey all of you . i think by spawning the car in random with car density it will be perfect and do This (if player hitted That car then u will have one star or TWO OR... ) and finaly do it poursuit you. I dont know the script sarcasm.gif

 

 

Srry for bad english im not english boy xD

Link to comment
Share on other sites

aStiffSausage

Okay, I've been using as base Undercover Patrol Cops-mod. And this is what I've gotten:

-Super GT only

-SWAT-guys inside only

-Only white color

-Is a bit calmer when you don't have wanted

 

 

But still got few things to do..

-How can I add paintjob when Super GT spawns?

-How to make SWAT-guys leave the car faster if you have stopped, now if you stop, they drive 1-2 circles around you and then stop

-Weapon ID for Spas? I think I got sawn-off now... (Instant kill, didn't see the weapon tounge2.gif )

-Possibly fix for this: When you have wanted level and remove it with a cheat, they will still bust you biggrin.gif

-Maybe possible to add more grip to the car?

 

Hopefully you can help me tounge.gif

 

EDIT: Removed useless & long code turn.gif

Edited by oksa8
Link to comment
Share on other sites

Why are there all those different redirects at the bottom if they all go to the same place? Wouldn't them all redirecting to one be easier, as none of them have special behaviors?

pkmTc.gif

Link to comment
Share on other sites

aStiffSausage
Why are there all those different redirects at the bottom if they all go to the same place? Wouldn't them all redirecting to one be easier, as none of them have special behaviors?

I'm using other mod as base for this one, and still working on it... And does it really even affect anything if it's repeated 20 times? biggrin.gif

Link to comment
Share on other sites

aStiffSausage

So, I've managed to get paintjob work on the Super GT and get them right weapons. Last thing I which I really need help with is changing grip of the car, so it will affect only on the spawned Super GT, not to the normal ones.

 

If someone could explain me a bit how do I change the grip-values (and possible damage-value) with cleo-script.

 

Link to tutorial I didn't understand

Memory Addresses which I don't know how to use

 

 

I know there are lots of variables at the end of the script, but those might be deleted or used for other cars. tounge2.gif

 

EDIT: Deleted long list of variables, easier to look at smile.gif

 

Some stuff this script now has:

-2 Swat guys driving Pagani Zonda F "Speed enforcer", other is armed with M4 and Uzi and the other one is armed with SPAS-12 and Uzi

-Both try to kill you instead busting you

-Soon added: Only spawns after 4-star wanted level

-No more huge list of variables smile.gif

 

 

 

And the script is here:

 

// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------thread 'SAUC' 4@ = 506 5@ = 352 7@ = 285 8@ = 285 :SAUC_43wait 5000 if   Player.Defined($PLAYER_CHAR)else_jump @SAUC_43 077E: get_active_interior_to 9@ if and 9@ == 0  $ONMISSION == 0 else_jump @SAUC_43 :SAUC_94wait 0 0@ = -1 if   Player.Defined($PLAYER_CHAR)else_jump @SAUC_94 04C4: store_coords_to 11@ 12@ 13@ from_actor $PLAYER_ACTOR with_offset -200.0 200.0 0.0 04C4: store_coords_to 14@ 15@ 16@ from_actor $PLAYER_ACTOR with_offset 200.0 400.0 0.0 053E: 0@ = get_random_car_with_model -1 in_rectangle_cornerA 11@ 12@ cornerB 14@ 15@ if 056E:   car 0@ defined else_jump @SAUC_233 if or  Car.Model(0@) == #SUPERGTjump @SAUC_365 :SAUC_23304C4: store_coords_to 11@ 12@ 13@ from_actor $PLAYER_ACTOR with_offset -200.0 -200.0 0.0 04C4: store_coords_to 14@ 15@ 16@ from_actor $PLAYER_ACTOR with_offset 200.0 -400.0 0.0 053E: 0@ = get_random_car_with_model -1 in_rectangle_cornerA 11@ 12@ cornerB 14@ 15@ else_jump @SAUC_94 02E3: 24@ = car 0@ speed if  24@ > 2.0 else_jump @SAUC_353 jump @SAUC_365 :SAUC_353Car.RemoveReferences(0@)jump @SAUC_43 :SAUC_3650407: store_coords_to 17@ 18@ 19@ from_car 0@ with_offset 0.0 0.0 0.0 10@ = Car.Angle(0@)gosub @SAUC_1794 Model.Load(4@)Model.Load(7@)Model.Load(8@)Model.Load(5@)Model.Load(#M4)Model.Load(#SHOTGSPA):SAUC_439wait 0 if and  Model.Available(4@)  Model.Available(7@)  Model.Available(8@)  Model.Available(5@)  Model.Available(#M4)  Model.Available(#SHOTGSPA)else_jump @SAUC_439Car.Destroy(0@)1@ = Car.Create(4@, 17@, 18@, 19@)0229: set_car 1@ primary_color_to 1 secondary_color_to 1 06ED: set_car 1@ paintjob 1 0129: 2@ = create_actor_pedtype 6 model 7@ in_car 1@ driverseat 01C8: 3@ = create_actor_pedtype 6 model 8@ in_car 1@ passenger_seat 0 01B2: give_actor 2@ weapon 27 ammo 99999 // Load the weapon model before using this Actor.WeaponAccuracy(2@) = 10001B2: give_actor 3@ weapon 31 ammo 99999 // Load the weapon model before using this Actor.WeaponAccuracy(3@) = 100Actor.Health(2@) = 100Actor.Health(3@) = 100Car.Angle(1@) = [email protected](4@)Model.Destroy(7@)Model.Destroy(8@)Model.Destroy(5@)Model.Destroy(#M4)Model.Destroy(#SHOTGSPA)0407: store_coords_to 21@ 22@ 23@ from_car 1@ with_offset 0.0 1000.0 0.0 Car.SetImmunities(1@, 0, 0, 0, 0, 0)Car.DriveTo(1@, 21@, 22@, 23@)Car.SetMaxSpeed(1@, 25.0)Car.SetToNormalDriver(1@)Car.SetDriverBehaviour(1@, FollowRoad)00AE: set_car 1@ traffic_behaviour_to 0 33@ = 5000 32@ = 0 25@ = 0 Car.DoorStatus(1@) = 2:SAUC_740wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @SAUC_1772 if and  not Car.Wrecked(1@)82BF:   not car 1@ sunk 81F4:   not car 1@ flipped else_jump @SAUC_1772 if and  not Actor.Dead(2@)  not Actor.Dead(3@)  Actor.InCar(2@, 1@)  Actor.InCar(3@, 1@)else_jump @SAUC_1548 if and 9@ == 0  $ONMISSION == 0 else_jump @SAUC_1772 if or  Actor.InCar($PLAYER_ACTOR, 1@)8202:   not actor $PLAYER_ACTOR near_car 1@ radius 450.0 450.0 flag 0   Player.WantedLevel($PLAYER_CHAR) > 5else_jump @SAUC_901 jump @SAUC_1772 :SAUC_901if and  not Player.WantedLevel($PLAYER_CHAR) > 0051C:   car 1@ damaged_by_actor $PLAYER_ACTOR else_jump @SAUC_934 Player.SetMinWantedLevel($PLAYER_CHAR, 1):SAUC_934if   Player.WantedLevel($PLAYER_CHAR) > 0else_jump @SAUC_1009 if  33@ > 5000 else_jump @SAUC_1066 33@ = 0 Car.SetMaxSpeed(1@, 100.0)Car.SetDriverBehaviour(1@, KillThePlayer)00AE: set_car 1@ traffic_behaviour_to 2 jump @SAUC_1066 :SAUC_1009if 051C:   car 1@ damaged_by_actor $PLAYER_ACTOR else_jump @SAUC_1035 jump @SAUC_740 :SAUC_1035Car.SetMaxSpeed(1@, 25.0)Car.SetDriverBehaviour(1@, FollowRoad)00AE: set_car 1@ traffic_behaviour_to 0 jump @SAUC_1066 :SAUC_1066if  25@ == 0 else_jump @SAUC_1136 if and0202:   actor $PLAYER_ACTOR near_car 1@ radius 10.0 10.0 flag 0   Player.WantedLevel($PLAYER_CHAR) > 0else_jump @SAUC_740 32@ = 0 25@ = 1 :SAUC_1136if and 25@ == 1  32@ > 5000 else_jump @SAUC_1268 if 0202:   actor $PLAYER_ACTOR near_car 1@ radius 10.0 10.0 flag 0 else_jump @SAUC_1367 32@ = 0 25@ = 0 Car.DoorStatus(1@) = 00633: AS_actor 2@ exit_car 0633: AS_actor 3@ exit_car 0961: unknown_actor 2@ flag 1 0961: unknown_actor 3@ flag 1 05E2: AS_actor 2@ kill_actor $PLAYER_ACTOR05E2: AS_actor 2@ kill_actor $PLAYER_ACTORCar.DoorStatus(1@) = 0jump @SAUC_1381 :SAUC_1268if or051A:   actor 2@ damaged_by_actor $PLAYER_ACTOR 051A:   actor 3@ damaged_by_actor $PLAYER_ACTOR   Actor.Animation($PLAYER_ACTOR) == "CAR_DOORLOCKED_LHS"  Actor.Animation($PLAYER_ACTOR) == "CAR_DOORLOCKED_RHS"else_jump @SAUC_740 32@ = 0 25@ = 6000 jump @SAUC_740 :SAUC_136725@ = 0 jump @SAUC_740 :SAUC_1381wait 0 if   Player.Defined($PLAYER_CHAR)else_jump @SAUC_1772 if   Player.WantedLevel($PLAYER_CHAR) > 0else_jump @SAUC_1772 if or  not Actor.Dead(2@)  not Actor.Dead(3@)else_jump @SAUC_1772 if or0104:   actor $PLAYER_ACTOR near_actor 2@ radius 70.0 70.0 70.0 sphere 0 0104:   actor $PLAYER_ACTOR near_actor 3@ radius 70.0 70.0 70.0 sphere 0 else_jump @SAUC_1772 if and  not Actor.Dead(2@)  not Actor.Dead(3@)else_jump @SAUC_1522 :SAUC_1522if  33@ > 5000 else_jump @SAUC_1381 33@ = 0 :SAUC_1548if   Player.WantedLevel($PLAYER_CHAR) > -1else_jump @SAUC_1772 if and  not Actor.Dead(2@)0104:   actor $PLAYER_ACTOR near_actor 2@ radius 70.0 70.0 70.0 sphere 0 else_jump @SAUC_1678 if and  Actor.InCar(2@, 1@)0104:   actor $PLAYER_ACTOR near_actor 2@ radius 30.0 30.0 70.0 sphere 0 else_jump @SAUC_1663 Car.DoorStatus(1@) = 00633: AS_actor 2@ exit_car :SAUC_16630961: unknown_actor 2@ flag 1 06E4: AS_actor 2@ attempt_to_bust_actor $PLAYER_ACTOR :SAUC_1678if and  not Actor.Dead(3@)0104:   actor $PLAYER_ACTOR near_actor 3@ radius 70.0 70.0 70.0 sphere 0 else_jump @SAUC_1772 if   Actor.InCar(3@, 1@)else_jump @SAUC_1750 Car.DoorStatus(1@) = 00633: AS_actor 3@ exit_car :SAUC_17500961: unknown_actor 3@ flag 1 06E4: AS_actor 3@ attempt_to_bust_actor $PLAYER_ACTOR jump @SAUC_1381 :SAUC_1772Actor.RemoveReferences(3@)Actor.RemoveReferences(2@)Car.RemoveReferences(1@)jump @SAUC_43 :SAUC_1794return 

 

Edited by oksa8
Link to comment
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
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

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