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

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
      4. Frontier Pursuits
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. DLC
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
      7. The Diamond Casino Heist
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

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

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

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

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

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

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

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. 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. News

    2. Forum Support

    3. Site Suggestions

Sign in to follow this  
gtafan113

Pull Over Car

Recommended Posts

gtafan113

I wanted to make a simple mod that will just allow me to pull over the car that is nearest in front of me.

 

My question is, how do I get the car that's nearest in front of me to a variable in a CLEO script? I also need to know how to get the people in the car as variables so that I can use them in the script to make them do other things.

 

Does anyone know how?

 

Thanks in advance,

Gtafan113

Share this post


Link to post
Share on other sites
TheSiggi
Try to use that opcode:

 

 

0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to [email protected] closest_ped_to [email protected]

 

which stores any car around you.... not lickely you get the car in front of you by using that

Share this post


Link to post
Share on other sites
gtafan113

I think that will work fine as long as I make sure I'm closest to that car?

 

Anyway, now I would want the car to pull to the right and stop. I would probably store the coords of the car with an offset, but offsets really confuse me and wouldn't they have to change depending on what direction the car is traveling?

Share this post


Link to post
Share on other sites
ZAZ

 

I think that will work fine as long as I make sure I'm closest to that car?

 

Anyway, now I would want the car to pull to the right and stop. I would probably store the coords of the car with an offset, but offsets really confuse me and wouldn't they have to change depending on what direction the car is traveling?

the offset coords returns allways coords in relation to the car center and it's angle

try

 

0407: create_coordinate [email protected] [email protected] [email protected] from_car [email protected] offset 3.0 3.0 0.000A7: car [email protected] drive_to [email protected] [email protected] [email protected]

 

Share this post


Link to post
Share on other sites
Deji

As far as I remember, offsets are relative to the cars angle, so right is always right. If not, sinus is always the option smile.gif

 

Feel free to some code from Vigilante Justice:

 

 

0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset 1.5 20.0 0.00407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset -1.5 0.0 0.0053E: [email protected] = get_random_car_with_model -1 in_rectangle_cornerA [email protected] [email protected] cornerB [email protected] [email protected]

 

 

This gets any car which is in front of yours. Works well in VJ.

 

Then try this for pullover:

 

 

0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset 5.0 0.0 0.002C0: store_to [email protected] [email protected] [email protected] ped_path_coords_closest_to [email protected] [email protected] [email protected]: car [email protected] drive_to [email protected] [email protected] [email protected]

 

 

If it pulls over to the wrong side, invert the 5.0 offset (-5.0). Increase and decrease to change how far it drives to the side.

 

The car should drive to the nearest ped path on the right. Probably won't work very well on motorways. For this reason, VJ just stops the car in it's place.

Share this post


Link to post
Share on other sites
gtafan113

Thank you both, I will try both ways to see which works best for me. smile.gif

 

Also, Deji, in the first two lines of code, would car [email protected] be the player car? That way your finding the car in front of it?

Share this post


Link to post
Share on other sites
Deji

Yes.

Share this post


Link to post
Share on other sites
gtafan113

Ok thank you very much. One more thing, how do I get all the passengers in the car to variables so I can make them get out and what not?

 

EDIT: This is my code so far. I'm trying to test it, but every time I hit the submission key (the key I want to use to pull a car over), my game crashes.

 

{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------03A4: name_thread 'PULLOVER' :PULLOVER_190001: wait 0 ms 00D6: if 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @PULLOVER_19 00D6: if 0038:   $ONMISSION == 0 004D: jump_if_false @PULLOVER_19 00D6: if 00DF:   actor $PLAYER_ACTOR driving 004D: jump_if_false @PULLOVER_19 00D9: [email protected] = actor $PLAYER_ACTOR car // mission only :PULLOVER_810001: wait 0 ms 00D6: if 00E1:   player 0 pressed_key 19 004D: jump_if_false @PULLOVER_81 0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset 1.5 20.0 0.0 0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset -1.5 0.0 0.0 053E: [email protected] = get_random_car_with_model -1 in_rectangle_cornerA [email protected] [email protected] cornerB [email protected] [email protected] 0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset 3.0 3.0 0.0 00A7: car [email protected] drive_to [email protected] [email protected] [email protected] 0002: jump @PULLOVER_19 0A93: end_custom_thread

 

 

 

Edited by gtafan113

Share this post


Link to post
Share on other sites
Silent

Add

 

00D6: if 056E:   car [email protected] defined 004D: jump_if_false @PULLOVER_81

 

below

 

053E: [email protected] = get_random_car_with_model -1 in_rectangle_cornerA [email protected] [email protected] cornerB [email protected] [email protected]

 

Because script don't checks if car is found.

 

You can also change

 

00D9: [email protected] = actor $PLAYER_ACTOR car // mission only

 

to

 

03C0: [email protected] = actor $PLAYER_ACTOR car

 

because 00D9 is only for mission (as said in comment).

 

Also 0A93 on the end of that script is only 2 bytes of waste in file tounge.gif

Edited by SilentPL

Share this post


Link to post
Share on other sites
Deji

Hehe.. Imagine how many mods we could install if everyone stuck to the optimization rules?

 

Like always using single quotes for strings of less than 8 chars, no matter what kind of variable it is. To me every byte counts... Then again, my computer is crap.

Share this post


Link to post
Share on other sites
gtafan113

Thank you Silent. Now it sort of works.

 

When I press the button, the car in front of me veers to the right and starts driving in circles, from the road back to the point and around and around. I need to make it stop at the coords. I can't find the opcode to make the car stop there though.

 

Also, I still need to figure out how to get the driver out of that car, into the passenger or back seat of my car, and then drive to the nearest police station. But, I can't find an opcode to store the driver of the pulled over car to a variable.

Share this post


Link to post
Share on other sites
gtafan113

Deji, I just found that the second time i searched too, thank you though. smile.gif

 

This is my script so far now. Now when I press the button, the driver immediately jumps out and runs, but I'm trying to make them get to the coords, then get out and stay there and once I point a gun at them they get into my car. Here's the script so far.

 

// 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---------------03A4: name_thread 'PULLOVER' :PULLOVER_190001: wait 0 ms 00D6: if 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @PULLOVER_19 00D6: if 0038:   $ONMISSION == 0 004D: jump_if_false @PULLOVER_19 00D6: if 00DF:   actor $PLAYER_ACTOR driving 004D: jump_if_false @PULLOVER_19 03C0: [email protected] = actor $PLAYER_ACTOR car :PULLOVER_810001: wait 0 ms 00D6: if 00E1:   player 0 pressed_key 19 004D: jump_if_false @PULLOVER_81 0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset 1.5 20.0 0.0 0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset -1.5 0.0 0.0 053E: [email protected] = get_random_car_with_model -1 in_rectangle_cornerA [email protected] [email protected] cornerB [email protected] [email protected] 00D6: if 056E:   car [email protected] defined 004D: jump_if_false @PULLOVER_81 046C: [email protected] = car [email protected] driver 00D6: if 056D:   actor [email protected] defined 004D: jump_if_false @PULLOVER_81 0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset 5.0 6.0 0.0 05D1: AS_actor [email protected] drive_car [email protected] to [email protected] [email protected] [email protected] speed 13.0 0 model #NULL 0 05CF: AS_actor [email protected] exit_car [email protected] when_at [email protected] [email protected] [email protected] 02A9: set_actor [email protected] immune_to_nonplayer 1 0350: set_actor [email protected] maintain_position_when_attacked 1 :PULLOVER_3070001: wait 0 ms 00D6: if 0457:   player $PLAYER_CHAR aiming_at_actor [email protected] 004D: jump_if_false @PULLOVER_307 05CA: AS_actor [email protected] enter_car [email protected] passenger_seat 1 10000 ms 0002: jump @PULLOVER_19 0A93: end_custom_thread

 

Share this post


Link to post
Share on other sites
Silent

Remove that 0A93! biggrin.gif

 

Try to use AS Pack, maybe that will help:

 

 

// 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---------------03A4: name_thread 'PULLOVER' :PULLOVER_190001: wait 0 ms 00D6: if 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @PULLOVER_19 00D6: if 0038:   $ONMISSION == 0 004D: jump_if_false @PULLOVER_19 00D6: if 00DF:   actor $PLAYER_ACTOR driving 004D: jump_if_false @PULLOVER_19 03C0: [email protected] = actor $PLAYER_ACTOR car :PULLOVER_810001: wait 0 ms 00D6: if 00E1:   player 0 pressed_key 19 004D: jump_if_false @PULLOVER_81 0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset 1.5 20.0 0.0 0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset -1.5 0.0 0.0 053E: [email protected] = get_random_car_with_model -1 in_rectangle_cornerA [email protected] [email protected] cornerB [email protected] [email protected] 00D6: if 056E:   car [email protected] defined 004D: jump_if_false @PULLOVER_81 046C: [email protected] = car [email protected] driver 00D6: if 056D:   actor [email protected] defined 004D: jump_if_false @PULLOVER_81 0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset 5.0 6.0 0.0 0615: define_AS_pack_begin [email protected] 05D1: AS_actor -1 drive_car [email protected] to [email protected] [email protected] [email protected] speed 13.0 0 model #NULL 0 05CF: AS_actor -1 exit_car [email protected] when_at [email protected] [email protected] [email protected] 0616: define_AS_pack_end [email protected] 0618: assign_actor [email protected] to_AS_pack [email protected]: remove_references_to_AS_pack [email protected] 02A9: set_actor [email protected] immune_to_nonplayer 1 0350: set_actor [email protected] maintain_position_when_attacked 1 :PULLOVER_3070001: wait 0 ms 00D6: if 0457:   player $PLAYER_CHAR aiming_at_actor [email protected] 004D: jump_if_false @PULLOVER_307 05CA: AS_actor [email protected] enter_car [email protected] passenger_seat 1 10000 ms 0002: jump @PULLOVER_19

 

 

And replace thread name to something which have less than 8 chars, because when ' ' has more than 7 chars, next 8 bytes are allocated for that name (why less than 8 chars when 8 byted are allocated? Cause that string must have null-terminator (00) at the end). So that's next 8 bytes of RAM wasted turn.gif

 

Deji, I'm sticking to optimisation rules in scripts too, but not really in SCM missions tounge.gif

And if You are REALLY sick of byte wasting, then remove all 'if' (but not 'if and' and 'if or'commands from your script) tounge2.gif

Share this post


Link to post
Share on other sites
gtafan113

Thank you again Silent, although I tried it and the ped is still jumping from the car right away and running. And if I do have time to aim at them before they run, they just put their arms up and then walk away.

Share this post


Link to post
Share on other sites
gtafan113

Thank you everyone again!

Okay, this is my code so far. The actor still gets out of the car before pulling it over, but at least he gets in and stays in as I drive around. I still need to figure out how to make him pull over first. It'd also be nice if he didn't start to walk away after getting out.

 

// 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---------------03A4: name_thread 'POVER' :POVER_110001: wait 0 ms 00D6: if 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @POVER_11 00D6: if 0038:   $ONMISSION == 0 004D: jump_if_false @POVER_11 00D6: if 00DF:   actor $PLAYER_ACTOR driving 004D: jump_if_false @POVER_11 03C0: [email protected] = actor $PLAYER_ACTOR car :POVER_730001: wait 0 ms 00D6: if 00E1:   player 0 pressed_key 19 004D: jump_if_false @POVER_73 0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset 1.5 20.0 0.0 0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset -1.5 0.0 0.0 053E: [email protected] = get_random_car_with_model -1 in_rectangle_cornerA [email protected] [email protected] cornerB [email protected] [email protected] 00D6: if 056E:   car [email protected] defined 004D: jump_if_false @POVER_73 046C: [email protected] = car [email protected] driver 00D6: if 056D:   actor [email protected] defined 004D: jump_if_false @POVER_73 0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset 5.0 6.0 0.0 0615: define_AS_pack_begin [email protected] 05D1: AS_actor [email protected] drive_car [email protected] to [email protected] [email protected] [email protected] speed 13.0 0 model #NULL 0 0633: AS_actor [email protected] exit_car 0638: AS_actor [email protected] stay_put 1 0616: define_AS_pack_end [email protected] 0618: assign_actor [email protected] to_AS_pack [email protected] 061B: remove_references_to_AS_pack [email protected] 02A9: set_actor [email protected] immune_to_nonplayer 1 0350: set_actor [email protected] maintain_position_when_attacked 1 :POVER_3170001: wait 0 ms 00D6: if 0457:   player $PLAYER_CHAR aiming_at_actor [email protected] 004D: jump_if_false @POVER_317 05CA: AS_actor [email protected] enter_car [email protected] passenger_seat 0 10000 ms 0001: wait 30000 ms 0002: jump @POVER_11

 

 

Once I get that part done, the rest should be easy. I'll bring up a menu of police stations to choose to drop the criminal off at and then just drive to the red marker.

 

 

 

 

Share this post


Link to post
Share on other sites
Silent

 

05D1: AS_actor [email protected] drive_car [email protected] to [email protected] [email protected] [email protected] speed 13.0 0 model #NULL 0 0633: AS_actor [email protected] exit_car 0638: AS_actor [email protected] stay_put 1

 

 

While defining AS Pack actor handle is useless, replace this with

 

05D1: AS_actor -1 drive_car [email protected] to [email protected] [email protected] [email protected] speed 13.0 0 model #NULL 0 0633: AS_actor -1 exit_car 0638: AS_actor -1 stay_put 1

 

If this won't help, then your bug is really weird ;]

Share this post


Link to post
Share on other sites
gtafan113

That did help a lot thank you.

 

I just got another idea though. Instead of making the driver get out how would I make the car just stop at the coords? Once I can get it to do that I can probably figure out the rest from there.

 

I figured it all out and I got everything working!

 

The only thing I can't do is close the car trunk. I can open it, but not close it. Anyone know how to close it?

Edited by gtafan113

Share this post


Link to post
Share on other sites
Silent

 

I just got another idea though. Instead of making the driver get out how would I make the car just stop at the coords? Once I can get it to do that I can probably figure out the rest from there.

Then just replace

 

0615: define_AS_pack_begin [email protected] 05D1: AS_actor -1 drive_car [email protected] to [email protected] [email protected] [email protected] speed 13.0 0 model #NULL 0 0633: AS_actor -1 exit_car 0638: AS_actor -1 stay_put 1 0616: define_AS_pack_end [email protected] 0618: assign_actor [email protected] to_AS_pack [email protected] 061B: remove_references_to_AS_pack [email protected]

 

to this

 

05D1: AS_actor [email protected] drive_car [email protected] to [email protected] [email protected] [email protected] speed 13.0 0 model #NULL 0

 

Should help.

 

 

The only thing I can't do is close the car trunk. I can open it, but not close it. Anyone know how to close it?

 

08A6: set_car [email protected] componentA 0 rotation_to 0.0

 

Just replace car handle and component slot, because I don't remember which number is car trunk :]

Share this post


Link to post
Share on other sites
gtafan113

Thank you! I now have a system where I can pull people over to search them, fine them, or arrest them. Thank you everyone for all the help. smile.gif

Share this post


Link to post
Share on other sites
gtafan113

Sorry for double-post but it's been a day and if I edited it noone would see it.

 

How do I get a random pedestrian that's in front of me? I can store the coords of a rectangle in front of me like the car, but can't find an opcode to get a random ped.

 

EDIT: I came up with this script, although it only works half the time and it crashes when I click the second to last option on the menu and on another one but I don't know what's wrong.

 

// 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---------------03A4: name_thread 'FARR' :FARR_110001: wait 0 ms 00D6: if and0256:   player $PLAYER_CHAR defined 80DF:   not actor $PLAYER_ACTOR driving 004D: jump_if_false @FARR_11 0001: wait 0 ms 00D6: if 00E1:   player 0 pressed_key 19 004D: jump_if_false @FARR_11 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 10.0 0.0 089E: get_actor_in_sphere [email protected] [email protected] [email protected] radius 8.0 handle_as [email protected] // versionB :FARR_1050001: wait 0 ms 00D6: if and82D8:   not actor $PLAYER_ACTOR current_weapon == 0 0457:   player $PLAYER_CHAR aiming_at_actor [email protected] 004D: jump_if_false @FARR_105 05C4: AS_actor [email protected] hands_up 15000 ms 04D7: set_actor [email protected] locked 1 01B4: set_player $PLAYER_CHAR can_move 0 08D4: [email protected] = create_panel_with_title 'PO001' position 29.0 170.0 width 180.0 columns 2 interactive 1 background 1 alignment 0 08DB: set_panel [email protected] column 0 header 'PO002' data 'PO004' 'PO005' 'PO006' 'PO007' 'PO008' 'PO023' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 08DB: set_panel [email protected] column 1 header 'PO003' data 'PO009' 'PO010' 'PO012' 'PO011' 'PO012' 'PO024' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' :FARR_4420001: wait 0 ms 00D6: if 00E1:   player 0 pressed_key 16 004D: jump_if_false @FARR_442 08D7: [email protected] = panel [email protected] active_row 08DA: remove_panel [email protected] 0001: wait 0 ms 00D6: if 0039:   [email protected] == 0 004D: jump_if_false @FARR_512 0006: [email protected] = 50 0002: jump @FARR_1072 :FARR_5120001: wait 0 ms 00D6: if 0039:   [email protected] == 1 004D: jump_if_false @FARR_548 0006: [email protected] = 100 0002: jump @FARR_1072 :FARR_5480001: wait 0 ms 00D6: if 0039:   [email protected] == 2 004D: jump_if_false @FARR_585 0006: [email protected] = 5000 0002: jump @FARR_1110 :FARR_5850001: wait 0 ms 00D6: if 0039:   [email protected] == 3 004D: jump_if_false @FARR_622 0006: [email protected] = 300 0002: jump @FARR_1072 :FARR_6220001: wait 0 ms 00D6: if 0039:   [email protected] == 4 004D: jump_if_false @FARR_707 00D6: if or02F2:   actor [email protected] model == #DWMOLC2 02F2:   actor [email protected] model == #WMYRI 02F2:   actor [email protected] model == #VIMYELV 02F2:   actor [email protected] model == #SWMYST 02F2:   actor [email protected] model == #SBFYRI 004D: jump_if_false @FARR_1026 0006: [email protected] = 5000 0002: jump @FARR_1110 :FARR_7070001: wait 0 ms 00D6: if 0039:   [email protected] == 5 004D: jump_if_false @FARR_512 00D6: if or02F2:   actor [email protected] model == #BFYRI 02F2:   actor [email protected] model == #BMOST 02F2:   actor [email protected] model == #BMYRI 02F2:   actor [email protected] model == #DWMYLC1 02F2:   actor [email protected] model == #CWMYHB1 02F2:   actor [email protected] model == #HMOST 004D: jump_if_false @FARR_799 0209: [email protected] = random_int_in_ranges 1 4 0002: jump @FARR_817 :FARR_7990001: wait 0 ms 0006: [email protected] = 1 0002: jump @FARR_817 :FARR_8170001: wait 0 ms 00D6: if 0039:   [email protected] == 1 004D: jump_if_false @FARR_890 0001: wait 3000 ms 00BC: show_text_highpriority GXT 'PO025' time 10000 flag 6 :FARR_8600001: wait 0 ms 01B4: set_player $PLAYER_CHAR can_move 1 04D7: set_actor [email protected] locked 0 01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian 0002: jump @FARR_11 :FARR_8900001: wait 0 ms 00D6: if 0039:   [email protected] == 2 004D: jump_if_false @FARR_956 0001: wait 3000 ms 0006: [email protected] = 200 0109: player $PLAYER_CHAR money += [email protected] 00BC: show_text_highpriority GXT 'PO026' time 10000 flag 6 0002: jump @FARR_860 :FARR_9560001: wait 0 ms 00D6: if 0039:   [email protected] == 3 004D: jump_if_false @FARR_817 0001: wait 3000 ms 0006: [email protected] = 6000 00BC: show_text_highpriority GXT 'PO027' time 10000 flag 6 08A6: set_car [email protected] componentA 1 rotation_to 0.0 0002: jump @FARR_1110 :FARR_10260001: wait 0 ms 00BC: show_text_highpriority GXT 'PO022' time 10000 flag 6 01B4: set_player $PLAYER_CHAR can_move 1 04D7: set_actor [email protected] locked 0 01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian 0002: jump @FARR_11 :FARR_10720001: wait 0 ms 0109: player $PLAYER_CHAR money += [email protected] 01B4: set_player $PLAYER_CHAR can_move 1 04D7: set_actor [email protected] locked 0 01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian 0002: jump @FARR_11 :FARR_11100001: wait 0 ms 00BC: show_text_highpriority GXT 'PO013' time 10000 flag 6 08D4: [email protected] = create_panel_with_title 'PO001' position 29.0 170.0 width 180.0 columns 2 interactive 1 background 1 alignment 0 08DB: set_panel [email protected] column 0 header 'PO014' data 'PO015' 'PO016' 'PO017' 'PO018' 'PO019' 'PO020' 'PO021' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' :FARR_12910001: wait 0 ms 00D6: if 00E1:   player 0 pressed_key 16 004D: jump_if_false @FARR_1291 08D7: [email protected] = panel [email protected] active_row 08DA: remove_panel [email protected] 04D7: set_actor [email protected] locked 0 01B4: set_player $PLAYER_CHAR can_move 1 :FARR_13390001: wait 0 ms 00D6: if 0039:   [email protected] == 0 004D: jump_if_false @FARR_1398 0006: [email protected] = 2311.7 0006: [email protected] = 2440.957 0006: [email protected] = 10.5536 0002: jump @FARR_1752 :FARR_13980001: wait 0 ms 00D6: if 0039:   [email protected] == 1 004D: jump_if_false @FARR_1457 0006: [email protected] = -211.6392 0006: [email protected] = 986.8689 0006: [email protected] = 19.1381 0002: jump @FARR_1752 :FARR_14570001: wait 0 ms 00D6: if 0039:   [email protected] == 2 004D: jump_if_false @FARR_1516 0006: [email protected] = -1407.807 0006: [email protected] = 2637.249 0006: [email protected] = 55.4204 0002: jump @FARR_1752 :FARR_15160001: wait 0 ms 00D6: if 0039:   [email protected] == 3 004D: jump_if_false @FARR_1575 0006: [email protected] = -1609.745 0006: [email protected] = 719.0884 0006: [email protected] = 12.4801 0002: jump @FARR_1752 :FARR_15750001: wait 0 ms 00D6: if 0039:   [email protected] == 4 004D: jump_if_false @FARR_1634 0006: [email protected] = -2159.69 0006: [email protected] = -2392.112 0006: [email protected] = 30.3593 0002: jump @FARR_1752 :FARR_16340001: wait 0 ms 00D6: if 0039:   [email protected] == 5 004D: jump_if_false @FARR_1693 0006: [email protected] = 628.2961 0006: [email protected] = -597.05 0006: [email protected] = 16.2496 0002: jump @FARR_1752 :FARR_16930001: wait 0 ms 00D6: if 0039:   [email protected] == 6 004D: jump_if_false @FARR_1339 0006: [email protected] = 1536.4 0006: [email protected] = -1671.585 0006: [email protected] = 13.1156 0002: jump @FARR_1752 :FARR_17520001: wait 0 ms 0004: $ONMISSION = 1 01B4: set_player $PLAYER_CHAR can_move 1 04D7: set_actor [email protected] locked 0 02A8: [email protected] = create_marker 30 at [email protected] [email protected] [email protected] 03BC: [email protected] = create_sphere_at [email protected] [email protected] [email protected] radius 3.0 0631: put_actor [email protected] in_group $PLAYER_GROUP :FARR_18200001: wait 0 ms 00D6: if 0101:   actor $PLAYER_ACTOR in_sphere [email protected] [email protected] [email protected] radius 3.0 3.0 3.0 sphere 0 stopped 004D: jump_if_false @FARR_1820 03BD: destroy_sphere [email protected] 0164: disable_marker [email protected] 06C9: remove_actor [email protected] from_group 0792: disembark_instantly_actor [email protected] 0109: player $PLAYER_CHAR money += [email protected] 0004: $ONMISSION = 0 01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian 0002: jump @FARR_11

 

 

Edited by gtafan113

Share this post


Link to post
Share on other sites
Silent

I didn't read the whole script, but found one error:

 

 

:FARR_6220001: wait 0 ms 00D6: if 0039:   [email protected] == 4 004D: jump_if_false @FARR_707 00D6: if or02F2:   actor [email protected] model == #DWMOLC2 02F2:   actor [email protected] model == #WMYRI 02F2:   actor [email protected] model == #VIMYELV 02F2:   actor [email protected] model == #SWMYST 02F2:   actor [email protected] model == #SBFYRI 004D: jump_if_false @FARR_1026 0006: [email protected] = 5000 0002: jump @FARR_1110 :FARR_7070001: wait 0 ms 00D6: if 0039:   [email protected] == 5 004D: jump_if_false @FARR_512 00D6: if or02F2:   actor [email protected] model == #BFYRI 02F2:   actor [email protected] model == #BMOST 02F2:   actor [email protected] model == #BMYRI 02F2:   actor [email protected] model == #DWMYLC1 02F2:   actor [email protected] model == #CWMYHB1 02F2:   actor [email protected] model == #HMOST 004D: jump_if_false @FARR_799 0209: [email protected] = random_int_in_ranges 1 4 0002: jump @FARR_817

 

Actor [email protected] isn't defined anywhere.

 

And it's better to use a jump table for choose right action instead of that long loop. Plus it's better to check if found ped is defined.

Share this post


Link to post
Share on other sites
gtafan113

Thank you, adding the defined actor helped a lot. There's still some problems though I'll have to find. I also found I was using the wrong variables to refer to the actor...

Share this post


Link to post
Share on other sites
Adam b

Deji i want to ask how to pullover a car in vigilante justice mod?

 

Share this post


Link to post
Share on other sites
BnB
Deji i want to ask how to pullover a car in vigilante justice mod?

Why did you bupm this very old topic?

Share this post


Link to post
Share on other sites
Deji

It's the irony of posting things like "use google, noob" on replies to new topics.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • 2 Users Currently Viewing
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

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