Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

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

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

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

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

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

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

    2. Support

    3. Suggestions

Speedlimit


aStiffSausage
 Share

Recommended Posts

aStiffSausage

So, it's me again, this time with a bit buggy speedlimit...

 

It's supposed to add 1 star wanted level at speed over 100km/h, 2 stars at 160km/h, and 3 stars when going over 200km/h.

 

I've been trying to set it give wanted level when there's police nearby, but when I used the part from Real Cops-mod by ToonSkull, I'm sometimes getting wanted level even if I'm not speeding, and sometimes when there's normal ped around. suicidal.gif

 

Someone check this code?

 

 

// 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 'LIMIT' 0004: $DRIVEBYMODE = 0 01F5: $PLAYER_ACTOR = get_player_actor $PLAYER_CHAR :LIMIT_260001: wait 0 ms 00D6: if 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @LIMIT_26 00D6: if and00DF:   actor $PLAYER_ACTOR driving 84A7:   not actor $PLAYER_ACTOR driving_boat 84A9:   not actor $PLAYER_ACTOR driving_heli 856C:   not actor $PLAYER_ACTOR driving_police_car 84AB:   not actor $PLAYER_ACTOR driving_plane 84C8:   not actor $PLAYER_ACTOR driving_flying_vehicle 89AE:   not actor $PLAYER_ACTOR driving_train 856C:   not actor $PLAYER_ACTOR driving_police_car 004D: jump_if_false @LIMIT_26 03C0: [email protected] = actor $PLAYER_ACTOR car 02E3: [email protected] = car [email protected] speed 00D6: if 0021:   [email protected] > 29.765 004D: jump_if_false @LIMIT_26 0002: jump @LIMIT_141 :LIMIT_14100D6: if and00DF:   actor $PLAYER_ACTOR driving 856C:   not actor $PLAYER_ACTOR driving_police_car 84A7:   not actor $PLAYER_ACTOR driving_boat 84A9:   not actor $PLAYER_ACTOR driving_heli 84AB:   not actor $PLAYER_ACTOR driving_plane 84C8:   not actor $PLAYER_ACTOR driving_flying_vehicle 89AE:   not actor $PLAYER_ACTOR driving_train 856C:   not actor $PLAYER_ACTOR driving_police_car 810F:   not player $PLAYER_CHAR wanted_level > 1 004D: jump_if_false @LIMIT_141 0001: wait 0 ms 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0 08E5: get_actor_in_sphere [email protected] [email protected] [email protected] radius 10.0 handle_as [email protected]: get_actor [email protected] pedtype_to [email protected]  else_jump @LIMIT_14100D6: if and0021:   [email protected] > 29.765056D:   actor [email protected] defined 0039:   [email protected] == 6 else_jump @LIMIT_141   jump @LIMIT_151:LIMIT_151wait 0 ms010E: set_player $PLAYER_CHAR minimum_wanted_level_to 1 0002: jump @LIMIT_241 :LIMIT_2410001: wait 0 ms 00D6: if 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @LIMIT_241 00D6: if and00DF:   actor $PLAYER_ACTOR driving 84A7:   not actor $PLAYER_ACTOR driving_boat 84A9:   not actor $PLAYER_ACTOR driving_heli 856C:   not actor $PLAYER_ACTOR driving_police_car 84AB:   not actor $PLAYER_ACTOR driving_plane 84C8:   not actor $PLAYER_ACTOR driving_flying_vehicle 89AE:   not actor $PLAYER_ACTOR driving_train 856C:   not actor $PLAYER_ACTOR driving_police_car 004D: jump_if_false @LIMIT_24103C0: [email protected] = actor $PLAYER_ACTOR car 02E3: [email protected] = car [email protected] speed 00D6: if 0021:   [email protected] > 47.6245 004D: jump_if_false @LIMIT_26 0002: jump @LIMIT_248 :LIMIT_24800D6: if and00DF:   actor $PLAYER_ACTOR driving 856C:   not actor $PLAYER_ACTOR driving_police_car 84A7:   not actor $PLAYER_ACTOR driving_boat 84A9:   not actor $PLAYER_ACTOR driving_heli 84AB:   not actor $PLAYER_ACTOR driving_plane 84C8:   not actor $PLAYER_ACTOR driving_flying_vehicle 89AE:   not actor $PLAYER_ACTOR driving_train 856C:   not actor $PLAYER_ACTOR driving_police_car 810F:   not player $PLAYER_CHAR wanted_level > 2004D: jump_if_false @LIMIT_248 0001: wait 0 ms 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0 08E5: get_actor_in_sphere [email protected] [email protected] [email protected] radius 10.0 handle_as [email protected]: get_actor [email protected] pedtype_to [email protected] 00D6: if and0021:   [email protected] > 29.765056D:   actor [email protected] defined0039:   [email protected] == 6   else_jump @LIMIT_248jump @LIMIT_251:LIMIT_251010E: set_player $PLAYER_CHAR minimum_wanted_level_to 2 0002: jump @LIMIT_326:LIMIT_3260001: wait 0 ms 00D6: if 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @LIMIT_326 00D6: if and00DF:   actor $PLAYER_ACTOR driving 84A7:   not actor $PLAYER_ACTOR driving_boat 84A9:   not actor $PLAYER_ACTOR driving_heli 856C:   not actor $PLAYER_ACTOR driving_police_car 84AB:   not actor $PLAYER_ACTOR driving_plane 84C8:   not actor $PLAYER_ACTOR driving_flying_vehicle 89AE:   not actor $PLAYER_ACTOR driving_train 856C:   not actor $PLAYER_ACTOR driving_police_car 004D: jump_if_false @LIMIT_326 03C0: [email protected] = actor $PLAYER_ACTOR car 02E3: [email protected] = car [email protected] speed 00D6: if 0021:   [email protected] > 59.53004D: jump_if_false @LIMIT_26 0002: jump @LIMIT_3141 :LIMIT_314100D6: if and00DF:   actor $PLAYER_ACTOR driving 856C:   not actor $PLAYER_ACTOR driving_police_car 84A7:   not actor $PLAYER_ACTOR driving_boat 84A9:   not actor $PLAYER_ACTOR driving_heli 84AB:   not actor $PLAYER_ACTOR driving_plane 84C8:   not actor $PLAYER_ACTOR driving_flying_vehicle 89AE:   not actor $PLAYER_ACTOR driving_train 856C:   not actor $PLAYER_ACTOR driving_police_car 810F:   not player $PLAYER_CHAR wanted_level > 3 004D: jump_if_false @LIMIT_3141 0001: wait 0 ms 0001: wait 0 ms 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0 08E5: get_actor_in_sphere [email protected] [email protected] [email protected] radius 10.0 handle_as [email protected]: get_actor [email protected] pedtype_to [email protected] 00D6: if and0021:   [email protected] > 29.765056D:   actor [email protected] defined0039:   [email protected] == 6  else_jump @LIMIT_3141jump @LIMIT_3151:LIMIT_3151010E: set_player $PLAYER_CHAR minimum_wanted_level_to 3 0002: jump @LIMIT_26

 

 

 

EDIT: New script, now crashes at over 100km/h suicidal.gif

Edited by oksa8
Link to comment
Share on other sites

aStiffSausage

So, so far no one has helped me... bored.gif

 

But I've been trying to get one other script to work, it's supposed to be like this:

When you press PageUp, it will show a text-box with some text in it, and set max-speed of current vehicle to 20km/h, and every press of PageUp increases max-speed and pressing PageDown decreases max-speed by 20km/h, and if max-speed is 0km/h, then it's set to huge value. (Maybe around 400km/h).

 

I got it somehow to work now, it doesn't freeze the game anymore, but it neither works... cry.gif

 

Someone check it?

 

 

{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------03A4: name_thread 'TOPSPD'01F5: $PLAYER_ACTOR = get_player_actor $PLAYER_CHAR wait 10000 ms :TOPSPD_10wait 0 msif0256:   player $PLAYER_CHAR definedelse_jump @TOPSPD_10if and00DF:   actor $PLAYER_ACTOR driving84A7:   not actor $PLAYER_ACTOR driving_boat 84A9:   not actor $PLAYER_ACTOR driving_heli 84AB:   not actor $PLAYER_ACTOR driving_plane 84C8:   not actor $PLAYER_ACTOR driving_flying_vehicle 89AE:   not actor $PLAYER_ACTOR driving_trainelse_jump @TOPSPD_10jump @TOPSPD_20:TOPSPD_20if0AB0:  key_pressed 0x33 //PageUpelse_jump @TOPSPD_10jump @TOPSPD_30:TOPSPD_3003C0: [email protected] = actor $PLAYER_ACTOR car00AD: set_car [email protected] max_speed_to [email protected]@ = 5.593 if0AB0:  key_pressed 0x33 //[email protected] += 5.593end:TOPSPD_40if0AB0:  key_pressed 0x34 //[email protected] -= 5.593end:[email protected] == 0 then00AD: set_car [email protected] max_speed_to 100.0 end

 

Link to comment
Share on other sites

The player controle have higher priority to the player_car then opcode 00AD:

It's possible to force it, if the car gets a drive_to command

 

cruising can be done in this way

 

03C0: [email protected] = actor $PLAYER_ACTOR car02E3: [email protected] = car [email protected] speed:cruise_5wait  004BA: set_car [email protected] speed_instantly  [email protected] @cruise_5

 

 

your script of first post is a bit confused, i don't know where i should beginn

i recomand to work step by step, make first a simple script to find a cop and give him a marker

get_actor_in_sphere must not find your desired ped, what happens if a normal ped stands close to CJ but the cop some meters behind?

this code will find again the same ped

Link to comment
Share on other sites

aStiffSausage

Oh wow... Can't even create that marker on cop without crashing... suicidal.gif

 

 

// 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 'MARKER' wait 0 ms:MARKER_1wait 1000 msif 0256:   player $PLAYER_CHAR defined else_jump @MARKER_1jump @MARKER_2:MARKER_2wait 1000 msif00F2:   actor [email protected] near_actor $PLAYER_ACTOR radius 20.0 20.0 5.0056D:   actor [email protected] definedelse_jump @MARKER_1jump @MARKER_3:MARKER_3wait 1000 msif or  02F2:   actor [email protected] model == #LAPD1 02F2:   actor [email protected] model == #SFPD1 02F2:   actor [email protected] model == #LVPD102F2:   actor [email protected] model == #LAPDM102F2:   actor [email protected] model == #CSHERelse_jump @MARKER_1jump @MARKER_4:MARKER_4wait 1000 ms0187: [email protected] = create_marker_above_actor [email protected] @MARKER_1         

 

 

 

I'll be trying cruising-code soon.

Link to comment
Share on other sites

Oh wow... Can't even create that marker on cop without crashing... suicidal.gif

 

 

// 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 'MARKER' wait 0 ms:MARKER_1wait 1000 msif 0256:   player $PLAYER_CHAR defined else_jump @MARKER_1jump @MARKER_2:MARKER_2wait 1000 msif00F2:   actor [email protected] near_actor $PLAYER_ACTOR radius 20.0 20.0 5.0056D:   actor [email protected] definedelse_jump @MARKER_1jump @MARKER_3:MARKER_3wait 1000 msif or  02F2:   actor [email protected] model == #LAPD1 02F2:   actor [email protected] model == #SFPD1 02F2:   actor [email protected] model == #LVPD102F2:   actor [email protected] model == #LAPDM102F2:   actor [email protected] model == #CSHERelse_jump @MARKER_1jump @MARKER_4:MARKER_4wait 1000 ms0187: [email protected] = create_marker_above_actor [email protected] @MARKER_1         

 

 

 

I'll be trying cruising-code soon.

Erm as far as i can see you havent checked for a ped?

Link to comment
Share on other sites

aStiffSausage
Oh wow... Can't even create that marker on cop without crashing...  suicidal.gif

 

...

 

I'll be trying cruising-code soon.

Erm as far as i can see you havent checked for a ped?

K, how I do it? dontgetit.gif

Link to comment
Share on other sites

 

Oh wow... Can't even create that marker on cop without crashing...  suicidal.gif

 

...

 

I'll be trying cruising-code soon.

Erm as far as i can see you havent checked for a ped?

K, how I do it? dontgetit.gif

the script of your first post contains the codes

 

04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.008E5: get_actor_in_sphere [email protected] [email protected] [email protected] radius 10.0 handle_as [email protected]: if056D:   actor [email protected] definedelse_jump @LIMIT_141

 

 

read more

Link to comment
Share on other sites

aStiffSausage

I thought I understood how the "kill-ped-nearby-and-show-pedtype-number"-script works, but nope. Crashes if speeding near cop. suicidal.gif

 

 

{$CLEO .cs}:RandomActor_for_to_step_methodthread 'RAFSTEP':RAFSTEP_10001: wait 0 ms00D6: if0256:   player $PLAYER_CHAR defined004D: jump_if_false @RAFSTEP_100A0: store_actor $PLAYER_ACTOR position_to [email protected] [email protected] [email protected]: call_scm_func @RAFSTEP_func 4 [email protected] [email protected] [email protected] 5.0 [email protected]: if8039:   not  [email protected] == -1004D: jump_if_false @RAFSTEP_100D6: if8118:   not actor [email protected] dead004D: jump_if_false @RAFSTEP_1089F: get_actor [email protected] pedtype_to [email protected]: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrianif0039:   [email protected] == 6thenjump @LIMIT_26end0002: jump @RAFSTEP_1:RAFSTEP_func0006: [email protected] = 00006: [email protected] = 0:RAFSTEP_countLoop00D6: if056D:   actor [email protected] defined004D: jump_if_false @RAFSTEP_1100D6: if and803B:   not  $PLAYER_ACTOR == [email protected] // (int)00FE:   actor [email protected] sphere 0 in_sphere [email protected] [email protected] [email protected] radius [email protected] [email protected] [email protected]: jump_if_false @RAFSTEP_110006: [email protected] = 10002: jump @RAFSTEP_12:RAFSTEP_11000A: [email protected] += 100D6: if0019:   [email protected] > 30000004D: jump_if_false @RAFSTEP_countLoop:RAFSTEP_1200D6: if0039:   [email protected] == 0004D: jump_if_false @RAFSTEP_Result0006: [email protected] = -1:RAFSTEP_Result0AB2: ret 1 [email protected]:LIMIT_260001: wait 0 ms 00D6: if 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @LIMIT_26 00D6: if and00DF:   actor $PLAYER_ACTOR driving 84A7:   not actor $PLAYER_ACTOR driving_boat 84A9:   not actor $PLAYER_ACTOR driving_heli 856C:   not actor $PLAYER_ACTOR driving_police_car 84AB:   not actor $PLAYER_ACTOR driving_plane 84C8:   not actor $PLAYER_ACTOR driving_flying_vehicle 89AE:   not actor $PLAYER_ACTOR driving_train 856C:   not actor $PLAYER_ACTOR driving_police_car 004D: jump_if_false @LIMIT_26 03C0: [email protected] = actor $PLAYER_ACTOR car 02E3: [email protected] = car [email protected] speed 00D6: if 0021:   [email protected] > 29.765 004D: jump_if_false @LIMIT_26 0002: jump @LIMIT_141 :LIMIT_14100D6: if and00DF:   actor $PLAYER_ACTOR driving 856C:   not actor $PLAYER_ACTOR driving_police_car 84A7:   not actor $PLAYER_ACTOR driving_boat 84A9:   not actor $PLAYER_ACTOR driving_heli 84AB:   not actor $PLAYER_ACTOR driving_plane 84C8:   not actor $PLAYER_ACTOR driving_flying_vehicle 89AE:   not actor $PLAYER_ACTOR driving_train 856C:   not actor $PLAYER_ACTOR driving_police_car 810F:   not player $PLAYER_CHAR wanted_level > 1 004D: jump_if_false @LIMIT_141 0001: wait 0 ms   00D6: if and0039:   [email protected] == 60021:   [email protected] > 29.765  else_jump @LIMIT_26   jump @LIMIT_151:LIMIT_151010E: set_player $PLAYER_ACTOR minimum_wanted_level_to 6jump @RAFSTEP_1 

 

 

Link to comment
Share on other sites

I thought I understood how the "kill-ped-nearby-and-show-pedtype-number"-script works, but nope. Crashes if speeding near cop. suicidal.gif

 

 

you made a loop without wait

 

:LIMIT_14100D6: if and00DF:   actor $PLAYER_ACTOR driving856C:   not actor $PLAYER_ACTOR driving_police_car84A7:   not actor $PLAYER_ACTOR driving_boat84A9:   not actor $PLAYER_ACTOR driving_heli84AB:   not actor $PLAYER_ACTOR driving_plane84C8:   not actor $PLAYER_ACTOR driving_flying_vehicle89AE:   not actor $PLAYER_ACTOR driving_train856C:   not actor $PLAYER_ACTOR driving_police_car810F:   not player $PLAYER_CHAR wanted_level > 1004D: jump_if_false @LIMIT_141

 

Link to comment
Share on other sites

aStiffSausage

Added loop and tried some other possible stuff, changing jumps to other ones, a bit everything...

 

Request thread, here I come. suicidal.gif

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
 Share

  • 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.