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

ThePlague1988

Police Station never wanted... Need help.

Recommended Posts

ThePlague1988

Okay, what I'm trying to do is make it to where you buy the police station, you are never wanted when you're not on a mission, if on a mission you can get wanted. Below is my code I have so far it works but, causes an Unhandled Exception. The game crashes. By the way can't make a cleo script. Need this in MAIN.SCM, because I'ma port to the XBOX. How would I go about fixing this code.

 

Here is all of the code hope someone out there can help me out. Thanks in advance.

 

=============================================================================================In the right place (MAIN thread)=============================================================================================004F: create_thread @NONAME_48004F: create_thread @SKUMBUY0004: $711 = 0 // integer values==============================================================================================Never wanted when owning the Police Station (Can't figure out where the bug is that crashes the game everytime)==============================================================================================:NONAME_4800D6: if8256:   not player $PLAYER_CHAR defined 0038:   $711 == 0 // integer values 004D: jump_if_false @NONAME_48_29 0001: wait 0 ms 0002: jump @NONAME_48 :NONAME_48_290001: wait 500 ms 00D6: if 0500:   player $PLAYER_CHAR skin == 'PLAYER' 004D: jump_if_false @NONAME_48_29 004F: create_thread @NONAME_49 004E: end_thread :NONAME_49 0001: wait 0 ms00D6: if0038:   $ONMISSION == 0 // integer values004D: jump_if_false @NONAME_490110: clear_player $PLAYER_CHAR wanted_level0001: wait 250 ms 0002: jump @NONAME_49 ===============================================================================================Police Station Purchasing Below :===============================================================================================:SKUMBUY03A4: name_thread 'SKUMBUY' 0004: $ONMISSION = 1 // integer values 0001: wait 0 ms 0164: disable_marker $246 030C: progress_made += 1 0169: set_fade_color 0 0 1 016A: fade 0 500 ms 01B4: set_player $PLAYER_CHAR frozen_state 0 03BF: set_player $PLAYER_CHAR ignored_by_everyone_to 1 03F4: set_all_vehicles_apply_damage_rules 0 :SKUMBUY_6300D6: if 016B:   fading 004D: jump_if_false @SKUMBUY_136 0001: wait 0 ms 00D6: if 8256:   not player $PLAYER_CHAR defined 004D: jump_if_false @SKUMBUY_129 0570: $246 = create_asset_radar_marker_with_icon 36 at $52 $53 $54 018B: show_on_radar $246 2 004F: create_thread @SAVE7 004E: end_thread :SKUMBUY_1290002: jump @SKUMBUY_63 :SKUMBUY_1360570: $246 = create_asset_radar_marker_with_icon 36 at $52 $53 $54 018B: show_on_radar $246 2 004F: create_thread @SAVE7 0395: clear_area 1 at 389.541 -477.376 range 19.8 1.0 0055: put_player $PLAYER_CHAR at 420.4772 -438.636 10.1208 0171: set_player $PLAYER_CHAR z_angle_to 90.0 02A3: enable_widescreen 1 0169: set_fade_color 0 0 1 016A: fade 1 500 ms 015F: set_camera_position 399.389 -468.502 10.752 0.0 0.0 0.0 0160: point_camera 400.389 -469.502 13.752 2 :SKUMBUY_2910001: wait 0 ms 00D6: if 016B:   fading 004D: jump_if_false @SKUMBUY_338 00D6: if 8256:   not player $PLAYER_CHAR defined 004D: jump_if_false @SKUMBUY_331 0001: wait 1000 ms 004E: end_thread :SKUMBUY_3310002: jump @SKUMBUY_291 :SKUMBUY_3380004: $4266 = 1 // integer values 0004: $4267 = 1 // integer values 01E3: text_1number_styled 'SKUMBUY' 2000000 5000 ms 6  // The police station purchased: $~1~0529: add 2000000 to_money_spent_on_property_stats 0542: add_property 13 to_property_own_stats 0394: play_music 1 043C: set_game_sounds_disable_on_fade 0 0001: wait 2000 ms 00BC: text_highpriority 'BUYSAVE' 3000 ms 1  // ~g~You can now save your game here when not on a mission.0001: wait 3000 ms 0169: set_fade_color 0 0 1 016A: fade 0 500 ms :SKUMBUY_4310001: wait 0 ms 00D6: if 016B:   fading 004D: jump_if_false @SKUMBUY_482 00D6: if 8256:   not player $PLAYER_CHAR defined 004D: jump_if_false @SKUMBUY_475 043C: set_game_sounds_disable_on_fade 1 0001: wait 1000 ms 004E: end_thread :SKUMBUY_4750002: jump @SKUMBUY_431 :SKUMBUY_48200BC: text_highpriority 'CAR_NO' 15000 ms 1  // You just reached the highlight. You will never be wanted again with normal clothes and the police is your gang. They are everywhere and drive police-cheetah.0373: set_camera_directly_behind_player 02EB: restore_camera_with_jumpcut 01B4: set_player $PLAYER_CHAR frozen_state 1 03BF: set_player $PLAYER_CHAR ignored_by_everyone_to 0 0004: $711 = 1 // integer values 0235: set_gang 6 models_to #COP #COP 0236: set_gang 6 car_to #VICECHEE 0237: set_gang 6 primary_weapon_to 18 secondary_weapon_to 23 032B: $4268 = create_weapon_pickup #MINIGUN 15 ammo 500 at 356.402 -484.846 13.836 032B: $4269 = create_weapon_pickup #CHROMEGUN 15 ammo 100 at 357.424 -482.826 13.836 0213: $4270 = create_pickup #BODYARMOUR type 2 at 359.042 -486.95 13.836 015C: set_zone_gang_info 'RICH3' 1 13 0 100 0 0 50 0 500 0 0 0 015C: set_zone_gang_info 'RICH3' 0 10 0 100 0 0 50 0 500 0 0 0 0152: set_zone_car_info 'RICH3' 1 12 0 150 0 0 0 0 500 0 0 0 0152: set_zone_car_info 'RICH3' 0 10 0 150 0 0 0 0 500 0 0 0 015C: set_zone_gang_info 'BEACH3' 1 13 0 0 0 0 0 0 500 0 0 0 015C: set_zone_gang_info 'BEACH3' 0 10 0 0 0 0 0 0 500 0 0 0 0152: set_zone_car_info 'BEACH3' 1 12 0 0 0 0 0 0 500 0 0 0 0152: set_zone_car_info 'BEACH3' 0 10 0 0 0 0 0 0 500 0 0 0 015C: set_zone_gang_info 'BEACH2' 1 13 0 0 0 0 0 0 500 0 0 0 015C: set_zone_gang_info 'BEACH2' 0 10 0 0 0 0 0 0 500 0 0 0 0152: set_zone_car_info 'BEACH2' 1 12 0 0 0 0 0 0 500 0 0 0 0152: set_zone_car_info 'BEACH2' 0 10 0 0 0 0 0 0 500 0 0 0 015C: set_zone_gang_info 'BEACH1' 1 13 0 0 0 0 0 0 500 0 0 0 015C: set_zone_gang_info 'BEACH1' 0 10 0 0 0 0 0 0 500 0 0 0 0152: set_zone_car_info 'BEACH1' 1 12 0 0 0 0 0 0 500 0 0 0 0152: set_zone_car_info 'BEACH1' 0 10 0 0 0 0 0 0 500 0 0 0 015C: set_zone_gang_info 'OCEAND1' 1 13 0 0 0 0 0 0 500 0 0 0 015C: set_zone_gang_info 'OCEAND1' 0 10 0 0 0 0 0 0 500 0 0 0 0152: set_zone_car_info 'OCEAND1' 1 12 0 0 0 0 0 0 500 0 0 0 0152: set_zone_car_info 'OCEAND1' 0 10 0 0 0 0 0 0 500 0 0 0 015C: set_zone_gang_info 'OCEAND2' 1 13 0 50 50 0 0 0 500 0 0 0 015C: set_zone_gang_info 'OCEAND2' 0 10 0 50 50 0 0 0 500 0 0 0 0152: set_zone_car_info 'OCEAND2' 1 12 0 50 50 0 0 0 500 0 0 0 0152: set_zone_car_info 'OCEAND2' 0 10 0 50 50 0 0 0 500 0 0 0 03F4: set_all_vehicles_apply_damage_rules 1 02A3: enable_widescreen 0 0169: set_fade_color 0 0 1 016A: fade 1 500 ms 0050: gosub @HELP_2844 043C: set_game_sounds_disable_on_fade 1 0004: $ONMISSION = 0 // integer values 00D8: mission_cleanup 004E: end_thread 0051: return 

 

 

NOTE: The thread NONAME_48 works perfectly, the problem is somewhere in NONAME_49.. but if you take out then, it won't check to see if you're on a mission or not. I tried like 20 or 30 different ways to write this code but, came up with nothing. All the ways I've tried crashed the game at some point or another. Thanks in advance. Please reply ASAP. Because I would like to get my mod on my XBOX and then play it.

Edited by ThePlague1988

Share this post


Link to post
Share on other sites
Bad.boy!

At noname_48 you should put a wait at the beginning and you should use if and instead of just if. And you created a thread in a thread I don't know if that's possible. You also forgot a wait at the begin of skumbuy_63, and you created a thread in a thread again. And you didn't post that thread.

 

0500 is for body parts, check if model is null instead:

 

0500:   player $PLAYER_CHAR skin == 'PLAYER'0500:   player $PLAYER_CHAR skin == "GIMPLEG" on_bodypart 17 

 

 

You could leave those waits in theory but it has solved some crashes before.

Share this post


Link to post
Share on other sites
Ashwin.Star

 

At noname_48 you should put a wait at the beginning

 

i am not agree with you,

 

:NONAME_48

00D6: if

8256:   not player $PLAYER_CHAR defined

0038:   $711 == 0 // integer values

004D: jump_if_false @NONAME_48_29

0001: wait 0 ms                   //<---------------- Already done

0002: jump @NONAME_48

 

 

@ThePlague1988

the 'return' at the end is useless if you are using End_thread before it,

 

the problem is somewhere in NONAME_49

i am sure there is no problem in it,

may be the problem is at 0050: gosub @HELP_2844,

can you show it here

Share this post


Link to post
Share on other sites
ThePlague1988

Here is HELP_2844 as requested...

 

 

:HELP_284400D6: if 016B:   fading 004D: jump_if_false @HELP_2868 0001: wait 0 ms 0002: jump @HELP_2844 :HELP_286800D6: if 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @HELP_2889 011C: actor $PLAYER_ACTOR clear_objective :HELP_28890051: return 

 

 

All though I don't think its this that could be causing it either, because when you buy the police station it's fine... but a ways afterward. Is when it crashes, usually when you play a mission or two.

Edited by ThePlague1988

Share this post


Link to post
Share on other sites
Ashwin.Star

yeah you are right!

but it is not necessary to use :HELP_2844,

 

0169: set_fade_color 0 0 1 016A: fade 1 500 ms wait 500                 //<------------- as fade is of 500 ms011C: actor $PLAYER_ACTOR clear_objective043C: set_game_sounds_disable_on_fade 1 0004: $ONMISSION = 0 // integer values 00D8: mission_cleanup //<-------------------- i thought this opcode is for Missions only not for thread004E: end_threadreturn //<---------- no need of this, it's useless

 

 

and why don't you merge all these in one ?

 

:NONAME_48wait 000D6: if and   //<----------- and,or are used when we want to check more than one conditions,0256:   player $PLAYER_CHAR defined 0038:   $711 == 1 // integer values 0500:   player $PLAYER_CHAR skin == 'PLAYER'0038:   $ONMISSION == 0 004D: jump_if_false @NONAME_48 0110: clear_player $PLAYER_CHAR wanted_level  // 010D: set_player $player_char wanted_level_to 00002: jump @NONAME_48 

 

this will do the same thing, plus reduce the chance of crash & size

Edited by Ashwin the new boy

Share this post


Link to post
Share on other sites
ThePlague1988

Man its still not working there is something wrong with that, maybe you can't check if you're on a mission because I removed that check and it works perfectly. But I want that check in there so if your on a mission like cop land where you need to be wanted you can. I just don't know how I would go about making it work like that though... a different way, cause this way keeps crashing the game everytime you are on a mission.

Share this post


Link to post
Share on other sites
spaceeinstein

How are you purchasing that at all? Nothing is allowing you to purchase. Here's a compact and no crashy code for "NONAME_48"

 

while true   wait 0   if       0256:   player $PLAYER_CHAR defined   then       if and           0500:   player $PLAYER_CHAR skin == 'PLAYER'           $711 == 1           $ONMISSION == 0       then           0110: clear_player $PLAYER_CHAR wanted_level       end   endend

 

I will help with the rest if you can provide the code to trigger the purchase of the property.

Share this post


Link to post
Share on other sites
Ashwin.Star

it means you have not used 0180: above in main thread, am i right ?

 

0180: set_on_mission_flag_to $onmission

 

Share this post


Link to post
Share on other sites
ThePlague1988

Thanks spaceeinstein.. for your reply.

Here is the code to buy the police station that you've requested...

 

 

:SKUMBY03A4: name_thread 'SKUMBY' :SKUMBY_100001: wait $DEFAULT_WAIT_TIME ms 00D6: if 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @SKUMBY_87 00D6: if 0038:   $ONMISSION == 0 // integer values 004D: jump_if_false @SKUMBY_87 00D6: if 03EE:   player $PLAYER_CHAR controllable 004D: jump_if_false @SKUMBY_87 00D6: if 0214:   pickup $245 picked_up 004D: jump_if_false @SKUMBY_87 0417: start_mission 50  // Skumole Shack Buy004E: end_thread :SKUMBY_870002: jump @SKUMBY_10 :SKUMBY_940001: wait $DEFAULT_WAIT_TIME ms 00D6: if 0038:   $322 == 1 // integer values 004D: jump_if_false @SKUMBY_119 004E: end_thread :SKUMBY_11900D6: if 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @SKUMBY_251 00D6: if 00F6:   player $PLAYER_CHAR 0 $100 $101 $102 radius 1.5 2.0 2.0 004D: jump_if_false @SKUMBY_251 00D6: if 0038:   $ONMISSION == 0 // integer values 004D: jump_if_false @SKUMBY_251 00D6: if 03EE:   player $PLAYER_CHAR controllable 004D: jump_if_false @SKUMBY_251 0050: gosub @HELP_3534 0050: gosub @HELP_2795 00BA: text_styled 'CAP_1' 15000 ms 2  // You can always rob the bank again and again. Check the Malibu.0050: gosub @HELP_2844 0417: start_mission 51  // Cap the Collector:SKUMBY_2510002: jump @SKUMBY_94 

 

 

Also is this right... NONAME_58 (Originally Cap the Collector)

 

//-------------Mission 51---------------// Originally: Cap the Collector:NONAME_580051: return 

 

Edited by ThePlague1988

Share this post


Link to post
Share on other sites
ThePlague1988
How are you purchasing that at all? Nothing is allowing you to purchase. Here's a compact and no crashy code for "NONAME_48"

 

while true   wait 0   if       0256:   player $PLAYER_CHAR defined   then       if and           0500:   player $PLAYER_CHAR skin == 'PLAYER'           $711 == 1           $ONMISSION == 0       then           0110: clear_player $PLAYER_CHAR wanted_level       end   endend

 

I will help with the rest if you can provide the code to trigger the purchase of the property.

I tried that and it still crashes the game... haven't tried the pc version but I'm certain that it will do it there to dunno how to put that code in obviously.

Share this post


Link to post
Share on other sites
spaceeinstein

It looks like you're doing much more massive change than property purchase. Are you replacing all of Skumole Shack and Cap the Collector? The way you're doing it, you are deleting vital code.

Share this post


Link to post
Share on other sites
ThePlague1988

 

It looks like you're doing much more massive change than property purchase. Are you replacing all of Skumole Shack and Cap the Collector? The way you're doing it, you are deleting vital code.

Ahhh... could you help me fix it please? If I email you the code?

 

BTW: It was originally written in BW's Vice City Mission Builder v1.3, if you don't have it I can email you that too. Please reply as soon as possible. Thanks again for all your help.

Edited by ThePlague1988

Share this post


Link to post
Share on other sites
spaceeinstein

Why not start from scratch? I have made an example code a long time ago and it doesn't involve editing missions at all.

Share this post


Link to post
Share on other sites
ThePlague1988

Thanks man... I'll start learning then. I'd rather learn myself how to do this so hopefully. I won't be a n00b forever. 3 years ago, is when I quit scripting for Vice City.

Now I've decided to get back into it, but I have to pretty much re-learn everything that I've learned back then. It sucks.... sad.gif

 

EDIT:

 

Here is the code I put in a stripped script but, it still doesn't work. I didn't create a save for it yet. Just want to figure out how to create a buyable property first then I'll add the rest step by step. Anyway here is the code.

 

 

// Note: didn't replace anything this time// but, it crashes the game do you know why?:POPOBY0006: [email protected] = 2500000 // price0007: [email protected] = 402.075 // x coordinate0007: [email protected] = -474.721 // y coordinate0007: [email protected] = 11.772 // z coordinate0518: [email protected] = create_available_asset_pickup 'PROP_3' at [email protected] [email protected] [email protected] price [email protected] // Press ~k~~PED_ANSWER_PHONE~ to buy this property for $~1~03A4: name_thread 'POPOBY':POPOBY_100001: wait 250 ms00D6: if0256:   player $PLAYER_CHAR defined004D: jump_if_false @POPOBY_8700D6: if0038:   $ONMISSION == 0004D: jump_if_false @POPOBY_8700D6: if03EE:   player $PLAYER_CHAR controllable004D: jump_if_false @POPOBY_8700D6: if0214:   pickup [email protected] picked_up004D: jump_if_false @POPOBY_870417: start_mission POPOBUY // Police Station purchasing004E: end_thread:POPOBY_870002: jump @POPOBY_10==================== The Actual Mission to buy The Police Station ====================//-------------Mission 97---------------:POPOBUY03A4: name_thread 'POPOBUY'0004: $ONMISSION = 10169: set_fade_color 0 0 1016A: fade 0 500 ms01B4: set_player $PLAYER_CHAR frozen_state 003BF: set_player $PLAYER_CHAR ignored_by_everyone_to 103F4: set_all_vehicles_apply_damage_rules 0:POPOBUY_5000D6: if016B:   fading004D: jump_if_false @POPOBUY_920001: wait 0 ms00D6: if8256:   not player $PLAYER_CHAR defined004D: jump_if_false @POPOBUY_85004E: end_thread:POPOBUY_850002: jump @POPOBUY_50:POPOBUY_920055: put_player $PLAYER_CHAR at 403.342 -463.707 9.136 0171: set_player $PLAYER_CHAR z_angle_to 110.0 02A3: toggle_widescreen 10169: set_fade_color 0 0 1016A: fade 1 500 ms015F: set_camera_position 399.389 -468.502 10.752 0.0 0.0 0.0 0160: point_camera 400.389 -469.502 13.752 2 :POPOBUY_16200D6: if016B:   fading004D: jump_if_false @POPOBUY_2040001: wait 0 ms00D6: if8256:   not player $PLAYER_CHAR defined004D: jump_if_false @POPOBUY_197004E: end_thread:POPOBUY_1970002: jump @POPOBUY_162:POPOBUY_20400BA: text_styled 'BUYPRO' 5000 ms 2 // Property bought!0394: play_music 1043C: set_game_sounds_disable_on_fade 00001: wait 5000 ms0169: set_fade_color 0 0 1016A: fade 0 500 ms:POPOBUY_24700D6: if016B:   fading004D: jump_if_false @POPOBUY_2930001: wait 0 ms00D6: if8256:   not player $PLAYER_CHAR defined004D: jump_if_false @POPOBUY_286043C: set_game_sounds_disable_on_fade 1004E: end_thread:POPOBUY_2860002: jump @POPOBUY_247:POPOBUY_2930373: set_camera_directly_behind_player02EB: restore_camera_with_jumpcut01B4: set_player $PLAYER_CHAR frozen_state 103BF: set_player $PLAYER_CHAR ignored_by_everyone_to 003F4: set_all_vehicles_apply_damage_rules 102A3: toggle_widescreen 00169: set_fade_color 0 0 1:POPOBUY_327016A: fade 1 500 ms00D6: if016B:   fading004D: jump_if_false @POPOBUY_3580001: wait 0 ms0002: jump @POPOBUY_327:POPOBUY_35800D6: if0256:   player $PLAYER_CHAR defined004D: jump_if_false @POPOBUY_379011C: actor $PLAYER_ACTOR clear_objective:POPOBUY_379043C: set_game_sounds_disable_on_fade 10004: $ONMISSION = 000D8: mission_cleanup004E: end_thread0051: return

 

 

NOTE: I'm not replacing anything in the script I'm creating a new asset_pickup thread then following it with a new mission to by the police station. But for some reason or another it's not working dunno why? If you could enlighten me please.

Edited by ThePlague1988

Share this post


Link to post
Share on other sites
Node

Try this:

 

 

:POPOBY0006: [email protected] = 2500000 // price0007: [email protected] = 402.075 // x coordinate0007: [email protected] = -474.721 // y coordinate0007: [email protected] = 11.772 // z coordinate0518: [email protected] = create_available_asset_pickup 'PROP_3' at [email protected] [email protected] [email protected] price [email protected] // Press ~k~~PED_ANSWER_PHONE~ to buy this property for $~1~03A4: name_thread 'POPOBY':POPOBY_100001: wait 0 ms00D6: if and0256:   player $PLAYER_CHAR defined0038:   $ONMISSION == 003EE:   player $PLAYER_CHAR controllable0214:   pickup [email protected] picked_upjf @POPOBY_100417: start_mission POPOBUY // Police Station purchasing004E: end_thread==================== The Actual Mission to buy The Police Station ====================//-------------Mission 97---------------:POPOBUY03A4: name_thread 'POPOBUY'0004: $ONMISSION = 10169: set_fade_color 0 0 1016A: fade 0 500 mswait 100001B4: set_player $PLAYER_CHAR frozen_state 003BF: set_player $PLAYER_CHAR ignored_by_everyone_to 103F4: set_all_vehicles_apply_damage_rules 0   0055: put_player $PLAYER_CHAR at 403.342 -463.707 9.136 0171: set_player $PLAYER_CHAR z_angle_to 110.0 02A3: toggle_widescreen 10169: set_fade_color 0 0 1016A: fade 1 500 ms015F: set_camera_position 399.389 -468.502 10.752 0.0 0.0 0.0 0160: point_camera 400.389 -469.502 13.752 2 wait 100000BA: text_styled 'BUYPRO' 5000 ms 2 // Property bought!0394: play_music 1043C: set_game_sounds_disable_on_fade 00001: wait 5000 ms0169: set_fade_color 0 0 1016A: fade 0 500 mswait 1000043C: set_game_sounds_disable_on_fade 10373: set_camera_directly_behind_player02EB: restore_camera_with_jumpcut01B4: set_player $PLAYER_CHAR frozen_state 103BF: set_player $PLAYER_CHAR ignored_by_everyone_to 003F4: set_all_vehicles_apply_damage_rules 102A3: toggle_widescreen 00169: set_fade_color 0 0 1016A: fade 1 500 mswait 1000011C: actor $PLAYER_ACTOR clear_objective043C: set_game_sounds_disable_on_fade 10004: $ONMISSION = 000D8: mission_cleanup004E: end_thread

 

 

Cleaned your code up, that should work now

If it doesn't then can you tell me where your game is crashing?

Share this post


Link to post
Share on other sites
ThePlague1988

Thanks Sorrow that code worked perfectly no crashing or anything. But I have a problem with the never wanted code here is what I'm using...

 

 

:NVRWNTD03A4: name_thread 'NVRWNTD'while true   wait 0   if       0256: player $PLAYER_CHAR defined   then       if and           0500: player $PLAYER_CHAR skin == 'PLAYER'           $NEVER_WANTED == 1           $ONMISSION == 0       then           0110: clear_player $PLAYER_CHAR wanted_level       end   endend 

 

 

I know it's this code that makes the game crash because if I remove it it doesn't crash at all and I tested it before I put this code in just to make sure.

Didn't crash the game before I put it in there. Dunno why that code would crash the game?

Share this post


Link to post
Share on other sites
Node

Try this:

 

 

:NVRWNTD03A4: name_thread 'NVRWNTD'while true  wait 0  if      0256: player $PLAYER_CHAR defined  then      wait 0      if and          0500: player $PLAYER_CHAR skin == 'PLAYER'          $NEVER_WANTED == 1          $ONMISSION == 0      then          0110: clear_player $PLAYER_CHAR wanted_level      end  endend

 

You didn't have a 'wait' before 'If and' causing the game to crash

 

Don't forget, Im always up for helping people

Especially people who make sense and are polite like you Plague icon14.gif

Edited by The_Sorrow

Share this post


Link to post
Share on other sites
ThePlague1988

Hmmm... still crashes and I don't know why? Here is all of the code that I've got for buying the police station and "supposed to never make you wanted with normal clothes".

 

 

:NVRWNTD03A4: name_thread 'NVRWNTD'while true wait 0 if     0256: player $PLAYER_CHAR defined then     wait 0     if and         0500: player $PLAYER_CHAR skin == 'PLAYER'         $NEVER_WANTED == 1         $ONMISSION == 0     then         0110: clear_player $PLAYER_CHAR wanted_level     end endend // POPOBY is the trigger to buying the police station// just so you know:POPOBY0004: $POPO_PRICE = 2500000 // price0007: [email protected] = 402.075 // x coordinate0007: [email protected] = -474.721 // y coordinate0007: [email protected] = 11.772 // z coordinate0518: [email protected] = create_available_asset_pickup 'CRED380' at [email protected] [email protected] [email protected] price $POPO_PRICE // Press ~k~~PED_ANSWER_PHONE~ to buy this property for $~1~03A4: name_thread 'POPOBY':POPOBY_100001: wait 0 ms00D6: if and0256:   player $PLAYER_CHAR defined0038:   $ONMISSION == 003EE:   player $PLAYER_CHAR controllable0214:   pickup [email protected] picked_upjf @POPOBY_100417: start_mission POPOBUY // Police Station purchasing004E: end_thread//-------------Mission 97---------------:POPOBUY03A4: name_thread 'POPOBUY'0004: $ONMISSION = 10169: set_fade_color 0 0 1016A: fade 0 500 mswait 100001B4: set_player $PLAYER_CHAR frozen_state 003BF: set_player $PLAYER_CHAR ignored_by_everyone_to 103F4: set_all_vehicles_apply_damage_rules 00004: $NEVER_WANTED = 1   0055: put_player $PLAYER_CHAR at 403.342 -463.707 9.136 0171: set_player $PLAYER_CHAR z_angle_to 110.0 02A3: toggle_widescreen 10169: set_fade_color 0 0 1016A: fade 1 500 ms015F: set_camera_position 399.389 -468.502 10.752 0.0 0.0 0.0 0160: point_camera 400.389 -469.502 13.752 2 wait 100001E3: text_1number_styled 'CRED381' $POPO_PRICE 5000 ms 6  // The police station purchased: $~1~0394: play_music 1043C: set_game_sounds_disable_on_fade 00001: wait 5000 ms0169: set_fade_color 0 0 1016A: fade 0 500 mswait 1000043C: set_game_sounds_disable_on_fade 10373: set_camera_directly_behind_player02EB: restore_camera_with_jumpcut01B4: set_player $PLAYER_CHAR frozen_state 103BF: set_player $PLAYER_CHAR ignored_by_everyone_to 003F4: set_all_vehicles_apply_damage_rules 102A3: toggle_widescreen 00169: set_fade_color 0 0 1016A: fade 1 500 mswait 1000011C: actor $PLAYER_ACTOR clear_objective043C: set_game_sounds_disable_on_fade 10004: $ONMISSION = 000D8: mission_cleanup004E: end_thread

 

 

Thanks in advance for any help in solving this problem. It's only if I remove the NVRWNTD code that it works perfectly without freezing. Hmmm.

 

EDIT:

 

BTW: If you take the never wanted code by itself it works same with the police station buying code. Did I put the $NEVER_WANTED variable in the right spot? That's all I can figure it is.

Edited by ThePlague1988

Share this post


Link to post
Share on other sites
Bad.boy!

You forgot a while true, at :NVRWNTD.

 

while true   wait 0   if       ...   then       while true // <-- this one           wait 0           if and               ...           then               ...           end       end   endend

 

 

But that would make the first check if player defined unnecessary, so you'd better merge it into one if and.

 

:NVRWNTD03A4: name_thread 'NVRWNTD'while true   wait 0   if and       0256: player $PLAYER_CHAR defined       0500: player $PLAYER_CHAR skin == 'PLAYER'       $NEVER_WANTED == 1       $ONMISSION == 0    then        0110: clear_player $PLAYER_CHAR wanted_level        004E: end_thread    endend 

 

 

EDIT:

And you forgot end thread.

Edited by Bad.boy!

Share this post


Link to post
Share on other sites
spaceeinstein

You are giving him information that strays from the intention of the original code. My code works perfectly fine if implemented correctly. Find

 

//-------------Mission 0---------------

 

Add my code above that line. Find

 

03A4: name_thread 'POPOBUY'  // your mission

 

Add below it

 

create_thread @NVRWNTD

 

Share this post


Link to post
Share on other sites
ThePlague1988
You are giving him information that strays from the intention of the original code. My code works perfectly fine if implemented correctly. Find

 

//-------------Mission 0---------------

 

Add my code above that line. Find

 

03A4: name_thread 'POPOBUY'  // your mission

 

Add below it

 

create_thread @NVRWNTD

 

Here is what I did....

 

 

:POPOBY0004: $POPO_PRICE = 2500000 // price0007: [email protected] = 402.075 // x coordinate0007: [email protected] = -474.721 // y coordinate0007: [email protected] = 11.772 // z coordinate0518: [email protected] = create_available_asset_pickup 'CRED380' at [email protected] [email protected] [email protected] price $POPO_PRICE // Press ~k~~PED_ANSWER_PHONE~ to buy this property for $~1~03A4: name_thread 'POPOBY':POPOBY_100001: wait 0 ms00D6: if and0256:   player $PLAYER_CHAR defined0038:   $ONMISSION == 003EE:   player $PLAYER_CHAR controllable0214:   pickup [email protected] picked_upjf @POPOBY_100417: start_mission POPOBUY // Police Station purchasing004E: end_thread:NVRWNTD03A4: name_thread 'NVRWNTD'while true  wait 0  if      0256:   player $PLAYER_CHAR defined  then      if and          0500:   player $PLAYER_CHAR skin == 'PLAYER'          $ONMISSION == 0          $NEVER_WANTED == 1      then          0110: clear_player $PLAYER_CHAR wanted_level      end  endend//-------------Mission 97---------------:POPOBUY03A4: name_thread 'POPOBUY'004F: create_thread @NVRWNTD0004: $ONMISSION = 10169: set_fade_color 0 0 1016A: fade 0 500 mswait 100001B4: set_player $PLAYER_CHAR frozen_state 003BF: set_player $PLAYER_CHAR ignored_by_everyone_to 103F4: set_all_vehicles_apply_damage_rules 0   0055: put_player $PLAYER_CHAR at 403.342 -463.707 9.136 0171: set_player $PLAYER_CHAR z_angle_to 110.0 02A3: toggle_widescreen 10169: set_fade_color 0 0 1016A: fade 1 500 ms015F: set_camera_position 399.389 -468.502 10.752 0.0 0.0 0.0 0160: point_camera 400.389 -469.502 13.752 2 wait 100001E3: text_1number_styled 'CRED381' $POPO_PRICE 5000 ms 6  // The police station purchased: $~1~0394: play_music 1043C: set_game_sounds_disable_on_fade 00001: wait 5000 ms0169: set_fade_color 0 0 1016A: fade 0 500 mswait 1000043C: set_game_sounds_disable_on_fade 10373: set_camera_directly_behind_player02EB: restore_camera_with_jumpcut01B4: set_player $PLAYER_CHAR frozen_state 103BF: set_player $PLAYER_CHAR ignored_by_everyone_to 003F4: set_all_vehicles_apply_damage_rules 102A3: toggle_widescreen 00169: set_fade_color 0 0 1016A: fade 1 500 mswait 1000011C: actor $PLAYER_ACTOR clear_objective043C: set_game_sounds_disable_on_fade 10004: $ONMISSION = 00004: $NEVER_WANTED = 100D8: mission_cleanup004E: end_thread

 

 

Did exactly what you said spaceeinstein and it still crashes on a mission.

Share this post


Link to post
Share on other sites
ThePlague1988

spaceeinstein here is the code for what you guys are helping me out with I've customised (modded) the New Vice City 2008 Mod. Please try to get it working in there then tell me how to do it. Thanks in advance.

 

Here is the link: http://www.mediafire.com/?ny8djmdiev68sjj

Share this post


Link to post
Share on other sites
ThePlague1988

Hey get this file : NVC 2008 Modded by Me

 

Then change it to where it works because I can't do it obviously. I screw it up everytime. Please help someone...

Share this post


Link to post
Share on other sites
ThePlague1988

Well anyone figure it out yet. I just tried the never wanted code in the stripped main.scm that spaceeinstein wrote. And it didn't work (the never wanted code) it just froze the game for some reason. Is it even possible to do what I'm trying to accomplish. Please reply. Thanks in advance.

 

Here is my own way I came up with... I know there is nothing wrong with this code but, it still crashes the game. Anyway

here is the code:

 

 

:NVRWNTDthread 'NVRWNTD':NVRWNTD_10wait 0if   Player.Defined($PLAYER_CHAR)then   wait 0   if       $NEVER_WANTED == 1   then       create_thread @TEST01   endendwait 500jump @NVRWNTD_10:TEST01wait 0if and   0500: player $PLAYER_CHAR skin == 'PLAYER'   $ONMISSION == 0then   0110: clear_player $PLAYER_CHAR wanted_levelendwait 250end_thread 

 

 

I'm beginning to think that you just can't do what I am trying to do.

Edited by ThePlague1988

Share this post


Link to post
Share on other sites
Node

Here, Try this:

 

 

:0wait 0if and0256:   player $PLAYER_CHAR defined 0500: player $PLAYER_CHAR skin == 'PLAYER'$ONMISSION == 0jf @00110: clear_player $PLAYER_CHAR wanted_levelwait 0jump @0

 

 

I know this works, I've tested it myself

Share this post


Link to post
Share on other sites
ThePlague1988

Okay I'll try it and hopefully this works... thanks for the reply man.

 

EDIT:

Okay this time I recorded the unhandled exception message.

 

It says:

Unhandled Exception c0000005

At Address 0045790d

 

What does that mean?

 

EDIT:

Could someone please use a simple stripped script put your code in there

and then upload it to MediaFire so I can download and look at how your guys'

code is implemented? Because I'm not doing something right apparently.

Edited by ThePlague1988

Share this post


Link to post
Share on other sites
spaceeinstein

It means my code and everything in this topic didn't crash the game. The game is crashing at opcode 020A and there are three locations in your script that has that opcode. You have never specified at what point your game crashed, that matters a lot. I just tried your script and it's not crashing the game at all.

Edited by spaceeinstein

Share this post


Link to post
Share on other sites
ThePlague1988

It crashes at the party mission when you go to the yacht to enter the actual party.. when the game fades then it says "The Party". That's when it freezes (crashes).

 

EDIT:

If I remove the door_status opcodes how do I lock the doors while you're in the car and then unlock when you hold down a key or when you exit the car.

 

Thanks in advance.

 

Actually I used that opcode (020A) throughout the whole script.. In pretty much every mission.

 

EDIT:

Here is the whole thing, just play through it buy the police station right after you gain control of Tommy. Then, go to the Ocean View Hotel. Then enter the mission the party (Lawyer Mission 1). Finally drive to the colonel's boat. When you enter the pink marker it should fade to black, say "The Party" at the lower right-hand corner of the screen. Then freeze and say unhandled exception.

 

Here's the updated script that we are working on:

NVC 2011 Modded by ThePlague1988 (Me)

 

BTW: Thanks in advance for all the help with will provide and have provided.. I really appreciate it, guys.

Edited by ThePlague1988

Share this post


Link to post
Share on other sites
ThePlague1988

Did anyone figure out what was wrong with it... if it's not our code then why does it freeze. Because I tried it in the original main.scm that came with vice city 1.0 and it still doesn't work.. it freezes

at the same point. After you enter the marker for the yacht and the screen fades to black then, it says "The Party". I still can't figure it out.

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.


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