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. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    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  
BEGINit

beginner in TC

Recommended Posts

BEGINit

Hello. I'm a beginner in here. At first, sorry about my bad english. Secondly, sorry about mistakes in this forum. I'm working with my first project for GTA3 and i want.. no - i'm begging for your help.

I need some missions. I have downloaded some mission codes from the internet, i have changed some mission codes of the original missions, but when i try to create my own mission i reach "death end". Yes, i have read your tutorials, but... So could you help me? If you say yes, i will write 1-2 missions that i want. Then you just have to write a mission codes with some explanations. Sorry about this egoistic request.

P.S. My friend is coming back from abroad and i want to make a surprise for him. Your help will be very valuable...

Share this post


Link to post
Share on other sites
BEGINit

OK i have a question could someone tell me why this code is not working:

 

004F: create_thread ££Label008DBD

 

:Label008DBD

0213: $13F = create_pickup -170 (BODYCAST) type 3 at 879.125 -432.6875 19.875

0213: $140 = create_pickup -170 (BODYCAST) type 3 at 879.0 188.3125 10.1875

0213: $141 = create_pickup -170 (BODYCAST) type 3 at 1599.125 -702.3125 12.0

0213: $142 = create_pickup -170 (BODYCAST) type 3 at 1256.25 -591.625 22.75

0213: $143 = create_pickup -170 (BODYCAST) type 3 at 90.5625 -724.0625 33.3125

0213: $144 = create_pickup -170 (BODYCAST) type 3 at 204.625 -1222.938 45.375

0213: $145 = create_pickup -170 (BODYCAST) type 3 at 401.125 -949.375 16.4375

0213: $146 = create_pickup -170 (BODYCAST) type 3 at 465.875 -76.875 9.9375

0213: $147 = create_pickup -170 (BODYCAST) type 3 at -839.75 -735.5 11.125

0213: $148 = create_pickup -170 (BODYCAST) type 3 at -1075.438 55.3125 49.4375

0213: $149 = create_pickup -170 (BODYCAST) type 3 at -155.9375 774.125 146.3125

0213: $14A = create_pickup -170 (BODYCAST) type 3 at -1218.125 352.625 31.3125

 

:Label008EA1

0001: wait 250 ms

00D6: if 0

0256: player $PLAYER_CHAR defined

004D: jump_if_false ££Label008EA1

00D6: if 0

0214: pickup $13F picked_up

004D: jump_if_false ££Label008EA1

0109: player $PLAYER_CHAR money += 5000

 

:Label008ECE

0001: wait 250 ms

00D6: if 0

0256: player $PLAYER_CHAR defined

004D: jump_if_false ££Label008ECE

00D6: if 0

0214: pickup $140 picked_up

004D: jump_if_false ££Label008ECE

0109: player $PLAYER_CHAR money += 5000

 

:Label008EFB

0001: wait 250 ms

00D6: if 0

0256: player $PLAYER_CHAR defined

004D: jump_if_false ££Label008EFB

00D6: if 0

0214: pickup $141 picked_up

004D: jump_if_false ££Label008EFB

0109: player $PLAYER_CHAR money += 5000

 

:Label008F28

0001: wait 250 ms

00D6: if 0

0256: player $PLAYER_CHAR defined

004D: jump_if_false ££Label008F28

00D6: if 0

0214: pickup $142 picked_up

004D: jump_if_false ££Label008F28

0109: player $PLAYER_CHAR money += 5000

 

:Label008F55

0001: wait 250 ms

00D6: if 0

0256: player $PLAYER_CHAR defined

004D: jump_if_false ££Label008F55

00D6: if 0

0214: pickup $143 picked_up

004D: jump_if_false ££Label008F55

0109: player $PLAYER_CHAR money += 5000

 

:Label008F82

0001: wait 250 ms

00D6: if 0

0256: player $PLAYER_CHAR defined

004D: jump_if_false ££Label008F82

00D6: if 0

0214: pickup $144 picked_up

004D: jump_if_false ££Label008F82

0109: player $PLAYER_CHAR money += 5000

 

:Label008FAF

0001: wait 250 ms

00D6: if 0

0256: player $PLAYER_CHAR defined

004D: jump_if_false ££Label008FAF

00D6: if 0

0214: pickup $145 picked_up

004D: jump_if_false ££Label008FAF

0109: player $PLAYER_CHAR money += 5000

 

:Label008FDC

0001: wait 250 ms

00D6: if 0

0256: player $PLAYER_CHAR defined

004D: jump_if_false ££Label008FDC

00D6: if 0

0214: pickup $146 picked_up

004D: jump_if_false ££Label008FDC

0109: player $PLAYER_CHAR money += 5000

 

:Label009009

0001: wait 250 ms

00D6: if 0

0256: player $PLAYER_CHAR defined

004D: jump_if_false ££Label009009

00D6: if 0

0214: pickup $147 picked_up

004D: jump_if_false ££Label009009

0109: player $PLAYER_CHAR money += 5000

 

:Label009036

0001: wait 250 ms

00D6: if 0

0256: player $PLAYER_CHAR defined

004D: jump_if_false ££Label009036

00D6: if 0

0214: pickup $148 picked_up

004D: jump_if_false ££Label009036

0109: player $PLAYER_CHAR money += 5000

 

:Label009063

0001: wait 250 ms

00D6: if 0

0256: player $PLAYER_CHAR defined

004D: jump_if_false ££Label009063

00D6: if 0

0214: pickup $149 picked_up

004D: jump_if_false ££Label009063

0109: player $PLAYER_CHAR money += 5000

 

:Label009090

0001: wait 250 ms

00D6: if 0

0256: player $PLAYER_CHAR defined

004D: jump_if_false ££Label009090

00D6: if 0

0214: pickup $14A picked_up

004D: jump_if_false ££Label009090

0109: player $PLAYER_CHAR money += 5000

 

 

I should get money for all hidden bodies, but i get only for the 1st, 2nd, 3rd and 4th. Why? I'm waiting for your answers.

Share this post


Link to post
Share on other sites
Sweet J Lou

Well, Try this:

 

004F: create_thread ££CAST_1

 

004F: create_thread ££1

004F: create_thread ££2

004F: create_thread ££3

004F: create_thread ££4

004F: create_thread ££5

004F: create_thread ££6

004F: create_thread ££7

004F: create_thread ££8

004F: create_thread ££9

004F: create_thread ££10

004F: create_thread ££11

004F: create_thread ££12

 

 

:CAST_1

0213: $13F = create_pickup -170 (BODYCAST) type 3 at 879.125 -432.6875 19.875

0213: $140 = create_pickup -170 (BODYCAST) type 3 at 879.0 188.3125 10.1875

0213: $141 = create_pickup -170 (BODYCAST) type 3 at 1599.125 -702.3125 12.0

0213: $142 = create_pickup -170 (BODYCAST) type 3 at 1256.25 -591.625 22.75

0213: $143 = create_pickup -170 (BODYCAST) type 3 at 90.5625 -724.0625 33.3125

0213: $144 = create_pickup -170 (BODYCAST) type 3 at 204.625 -1222.938 45.375

0213: $145 = create_pickup -170 (BODYCAST) type 3 at 401.125 -949.375 16.4375

0213: $146 = create_pickup -170 (BODYCAST) type 3 at 465.875 -76.875 9.9375

0213: $147 = create_pickup -170 (BODYCAST) type 3 at -839.75 -735.5 11.125

0213: $148 = create_pickup -170 (BODYCAST) type 3 at -1075.438 55.3125 49.4375

0213: $149 = create_pickup -170 (BODYCAST) type 3 at -155.9375 774.125 146.3125

0213: $14A = create_pickup -170 (BODYCAST) type 3 at -1218.125 352.625 31.3125

 

:1

0001: wait 250 ms

00D6: if 0

0256: player $PLAYER_CHAR defined

004D: jump_if_false ££Label008EA1

00D6: if 0

0214: pickup $13F picked_up

004D: jump_if_false ££Label008EA1

0109: player $PLAYER_CHAR money += 5000

 

:2

0001: wait 250 ms

00D6: if 0

0256: player $PLAYER_CHAR defined

004D: jump_if_false ££Label008ECE

00D6: if 0

0214: pickup $140 picked_up

004D: jump_if_false ££Label008ECE

0109: player $PLAYER_CHAR money += 5000

 

:3

0001: wait 250 ms

00D6: if 0

0256: player $PLAYER_CHAR defined

004D: jump_if_false ££Label008EFB

00D6: if 0

0214: pickup $141 picked_up

004D: jump_if_false ££Label008EFB

0109: player $PLAYER_CHAR money += 5000

 

:4

0001: wait 250 ms

00D6: if 0

0256: player $PLAYER_CHAR defined

004D: jump_if_false ££Label008F28

00D6: if 0

0214: pickup $142 picked_up

004D: jump_if_false ££Label008F28

0109: player $PLAYER_CHAR money += 5000

 

:5

0001: wait 250 ms

00D6: if 0

0256: player $PLAYER_CHAR defined

004D: jump_if_false ££Label008F55

00D6: if 0

0214: pickup $143 picked_up

004D: jump_if_false ££Label008F55

0109: player $PLAYER_CHAR money += 5000

 

:6

0001: wait 250 ms

00D6: if 0

0256: player $PLAYER_CHAR defined

004D: jump_if_false ££Label008F82

00D6: if 0

0214: pickup $144 picked_up

004D: jump_if_false ££Label008F82

0109: player $PLAYER_CHAR money += 5000

 

:7

0001: wait 250 ms

00D6: if 0

0256: player $PLAYER_CHAR defined

004D: jump_if_false ££Label008FAF

00D6: if 0

0214: pickup $145 picked_up

004D: jump_if_false ££Label008FAF

0109: player $PLAYER_CHAR money += 5000

 

:8

0001: wait 250 ms

00D6: if 0

0256: player $PLAYER_CHAR defined

004D: jump_if_false ££Label008FDC

00D6: if 0

0214: pickup $146 picked_up

004D: jump_if_false ££Label008FDC

0109: player $PLAYER_CHAR money += 5000

 

:9

0001: wait 250 ms

00D6: if 0

0256: player $PLAYER_CHAR defined

004D: jump_if_false ££Label009009

00D6: if 0

0214: pickup $147 picked_up

004D: jump_if_false ££Label009009

0109: player $PLAYER_CHAR money += 5000

 

:10

0001: wait 250 ms

00D6: if 0

0256: player $PLAYER_CHAR defined

004D: jump_if_false ££Label009036

00D6: if 0

0214: pickup $148 picked_up

004D: jump_if_false ££Label009036

0109: player $PLAYER_CHAR money += 5000

 

:11

0001: wait 250 ms

00D6: if 0

0256: player $PLAYER_CHAR defined

004D: jump_if_false ££Label009063

00D6: if 0

0214: pickup $149 picked_up

004D: jump_if_false ££Label009063

0109: player $PLAYER_CHAR money += 5000

 

:12

0001: wait 250 ms

00D6: if 0

0256: player $PLAYER_CHAR defined

004D: jump_if_false ££Label009090

00D6: if 0

0214: pickup $14A picked_up

004D: jump_if_false ££Label009090

0109: player $PLAYER_CHAR money += 5000

 

If it doesnt work then mess around with the codes and see what you came up with. Just remember that i dont have GTA3 yet so this code might me wrong.

Share this post


Link to post
Share on other sites
BEGINit

THANX! But one more question... 03E2: actor $abc exit car I tought that $abb should leave the car but it still sits in it. Maybe i should use or add something else. Help... please...

Share this post


Link to post
Share on other sites
Demarest

Woah woah woah woah woah! SLOW DOWN!

 

First of all, your opening post makes it sound like you have mission requests. If so, keep them in the requests topic/forum. Secondly, it's VERY good that you're willing to get in there and start trying things. I'm serious: VERY good. At the same time, it's important that you understand WHY you're doing things you are instead of just doing them.

 

For example, you have a series of code "paragraphs" there. They don't need repetetive waits. And since the only code you have that refers to the player is to add to his money, you do NOT need a dozen if player defined checks. Also, I urge to read over the Mission Builder readme again. I think you'll find that the more you read it and use it, the more you'll learn from it. Last but not least, always use locals when possible.

 

Now then, you're asking why only certain pickups give you money. Each of your paragraphs is a trap. Meaning the code will sit there reviewing that same paragraph until it's satisfied. So unless you grab the pickups in order, you're never going to see results from subsequent paragraphs. And since the "reward" for each pickup is the same, there's no reason why you cannot just clump all those conditionals together like so...

 

 

:LabelBODYCASTSTART0213:  [email protected] = create_pickup -170 (BODYCAST) type 3 at 879.125 -432.6875 19.8750213:  [email protected] = create_pickup -170 (BODYCAST) type 3 at 879.0 188.3125 10.18750213:  [email protected] = create_pickup -170 (BODYCAST) type 3 at 1599.125 -702.3125 12.00213:  [email protected] = create_pickup -170 (BODYCAST) type 3 at 1256.25 -591.625 22.750213:  [email protected] = create_pickup -170 (BODYCAST) type 3 at 90.5625 -724.0625 33.31250213:  [email protected] = create_pickup -170 (BODYCAST) type 3 at 204.625 -1222.938 45.3750213:  [email protected] = create_pickup -170 (BODYCAST) type 3 at 401.125 -949.375 16.43750213:  [email protected] = create_pickup -170 (BODYCAST) type 3 at 465.875 -76.875 9.93750213:  [email protected] = create_pickup -170 (BODYCAST) type 3 at -839.75 -735.5 11.1250213:  [email protected] = create_pickup -170 (BODYCAST) type 3 at -1075.438 55.3125 49.43750213:  [email protected] = create_pickup -170 (BODYCAST) type 3 at -155.9375 774.125 146.31250213:  [email protected] = create_pickup -170 (BODYCAST) type 3 at -1218.125 352.625 31.3125:LabelBODYCASTLOOP0001: wait 250 ms00D6: if  250214: pickup  [email protected] picked_up0214: pickup  [email protected] picked_up0214: pickup  [email protected] picked_up0214: pickup  [email protected] picked_up0214: pickup  [email protected] picked_up0214: pickup  [email protected] picked_up004D: jump_if_false ££LabelBODYCASTLOOP20002: jump ££LabelBODYCASTLOOP3:LabelBODYCASTLOOP200D6: if  250214: pickup  [email protected] picked_up0214: pickup  [email protected] picked_up0214: pickup  [email protected] picked_up0214: pickup  [email protected] picked_up0214: pickup  [email protected] picked_up0214: pickup  [email protected] picked_up004D: jump_if_false ££LabelBODYCASTLOOP:LabelBODYCASTLOOP30001: wait 250 ms00D6: if 00256: player $PLAYER_CHAR defined004D: jump_if_false ££LabelBODYCASTLOOP30109: player $PLAYER_CHAR money += 50000002: jump ££LabelBODYCASTLOOP

 

 

Your code weighed 768 bytes while mine weighs 358. That's not including the 48 bytes I freed up by using local vars instead of globals. And since this is for GTA3, you could shave off another 7 bytes by using jump_if_true (MAY need my INI update, though I'm not sure based on the newer version of MB you appear to be using) in the first if block. Or with any GTA, save those same 7 bytes by flipping the first block, but I'm trying to keep this simple for you. You can repay me by not only using that code, but looking at it for a moment. If you don't understand ANYTHING about it, ASK! I'd rather take more time to explain it and help you understand than for you to go off without having gained anything from this other than cleaner code. I should note that because you're using a newer version, my syntax in utilizing local vars MIGHT be incorrect. Again, consult the readme to double check. If your project got to be huge, you could even use another local to tally up how many pickups have been snagged and if they all have, end the thread to conserve resources. You can also use this approach if you wish to have a reward for collecting them all.

 

@Sweet J Lou: GTA3 has a limit of 128 concurrent threads and you just advised somebody to use 13 thread to do what one could accomplish. And since you used no terminations, completing one thread will cause it to run into the others. In other words, you took the poor programming and made it a LOT worse. Please do not try to lead others if you yourself could use some better understanding. That's not an attack and of course you can disregard it if your error was simply an oversight. But I doubt it since it's anything but concise.

Share this post


Link to post
Share on other sites
BEGINit

I feel like sh*t...but do not understand me incorrect. I,m very pleased that you are helping me. Every thing you've just said is so obvious(how i didnt realused that...) THANK YOU. Now i will be a very bad guy and try to pretend. I am from middle europe and my english is terrible (especially computer terms). So allmost everything i learned (looks like its nothing) by looking at the original script(still cannot understand everything). Thats why my codes are so bugged. Of course, i'm learning and i hope i will be good at coding...just like Demarest:) THANX AGAIN!

Share this post


Link to post
Share on other sites
Demarest
Well, just be patient. The important thing is that as you encounter new concepts, you make sure you understand WHY things are the way they are. If something's not clear, feel free to ask about it. On a brighter note, you're starting off with GTA3 and that's the best platform to learn on because it's the simplest. I feel sorry for coders trying to start off their coding career with SA.

Share this post


Link to post
Share on other sites
BEGINit

I appreciate your help. Thank you.

Share this post


Link to post
Share on other sites
BEGINit

Hi, I have aproblem. I created some missions, but i noticed that during one mission 2 actors appear instead of 1. I learned that this mission i can be done at the beginning of the game (it shouldn't be).

So i decited to look for create_thread...blah,blah, which creates thread with start_mission blah,blah.

But i can't find it enywhere (except after the mission wich is before). Then i tried to find the second command start_mission blah,blah but there is only one command. I used command ''find''. Later i tried to look for the create_thread manualy, but it was failure. I really need your help. Thanx.

Share this post


Link to post
Share on other sites
Demarest

Usually when that happens, point A launches code later on, but continues to process forward until it hits the point it was meant to launch. At that point, you'll have 2 threads processing the same data.

 

Also, are you sure you need to be dipping into missions just yet? ALL code should be perfected in a stripped SCM for various reasons and then transplanted as needed.

Share this post


Link to post
Share on other sites
BEGINit

1. I feel like complete idiot. I found a ''mistake'' - i was checking the wrong SCM. I have few main files for safety...

 

2. About dipping... Here's my story. I created about 80 missions for GTA3 (as you see i do a lot of mistakes so you can imagine my missions confused.gif ) But i realised that the storyline i created is a bit borring so i decided to change it into a much better. But i need to change, delete or leave as it is my missions. Thats why i change the missions that already exist and thats why mistakes like this ( i mean 2 actors) appear.

 

3. Thank you for helping me.

Share this post


Link to post
Share on other sites
Demarest
My pleasure. For what it's worth, you are NOT the only person that makes these mistakes. We all do smile.gif

Share this post


Link to post
Share on other sites
BEGINit

It's me again. And a problem. In one mission a guy should enter a car with a bomb and explode. At firs everything run smoothly. I get a bomb, go to the place, arm the bomb, leave the car and run away. Then the guy appears, enters the car and... nothing happens. It should explode. I was looking for a problem and i didnt find it. I even tried explode_car command then. Failure again. Maybe someone could advise where to look for a problem.

Share this post


Link to post
Share on other sites
Ben

As Dem is always saying - "immitate existing code" wink.gif. I think this would be a perfect time to do that - all you need to do is find an instance in the GTA3 code where what you're trying to do is actually done. And the bit that you'd be looking for would be the code for Joey's mission "Mike Lips Last Lunch".

 

So if you have a poke around the SCM for that snippet of code, and then make a few changes as needed (for it to work with your code), you should be right. If you still have problems, post again and someone who knows more about coding than I do will try and help out wink.gif. Good luck anyway smile.gif.

Share this post


Link to post
Share on other sites
Demarest

He's right. It should be noted that in GTA3 and VC, the engine supported 3 types of bomb garages as well as 3 types of car bombs themselves: remote detonation, time delay, and triggered. You're talking about triggered. Since the misison mentioned accomplishes this, it's safe to say that the bomb garage in Portland is of the triggered variety. Just like you could figure out thanks to Kanbu Bust-Out that the Staunton garage is a time delay. As is the bomb planted in the Trashmaster in Blow Fish.

 

I hope this helps demonstrate how immitating existing code plays out.

Share this post


Link to post
Share on other sites
BEGINit

I copied some main points of ''mike lips last lunch'' mission into my mission. Everything looked perfect, but the same problem still existed.I tried anything...and i found something. The car does not explode if i use player frozen_state command(during the cutscene when the guy enters the car and explodes) . Without it everything works with no problems. So, thats the problem? Can it be? Maybe i should know something more? I'm a little bit confused...

Share this post


Link to post
Share on other sites
Demarest
Hmmm... I never knew that. I knew that when player was frozen that all car fires are extinguished to prevent a car blowing up and killing the player when you're not even capable of avoiding such a fate. This might explain why sometimes I come out of that mission with a wanted level despite justing having passed a mission.

Share this post


Link to post
Share on other sites
BEGINit

Posted twice. Sorry, see below...

Edited by BEGINit

Share this post


Link to post
Share on other sites
BEGINit

Hi, it's me again. I was looking at the original code for hours, but i still do not understand how to make a working bar. I mean health bar, distance bar(spookometer or sth.) etc. So, i decided to ask you a favor. Could someone write an example code for a working health bar? Thank you.

Share this post


Link to post
Share on other sites
Demarest

If you were unable to read it in original code, then an example code would be the same thing, eh?

 

What you're looking for is status_text. There's two types: numeric and bar. The only thing you really need to know about it is that it MUST be established with a global var. So you set it with a GXT string and a global var. It will display the contents of that string onscreen and beside it, either has a numeral or a bar. Whenever that global var is updated, so is the status_text automatically. Then when you're finished with it, use the remove status_text command.

Share this post


Link to post
Share on other sites
BEGINit

Man...I still didn't get it...well maybe I will. Now I decided to show you one mission.

 

:Label0316CB

0050: gosub £Label0316EF

00D6: if 0

0112: wasted_or_busted

004D: jump_if_false £Label0316E6

0050: gosub £Label031B7B

 

:Label0316E6

0050: gosub £Label031B8C

004E: end_thread

 

:Label0316EF

0317: increment_mission_attempts

03A4: name_thread "MAYHEM"

0004: $ONMISSION = 1 ;; integer values

00BA: text_styled "LM4" 15000 ms 2 ;; 'PUMP-ACTION PIMP'

0001: wait 0 ms

0247: request_model #SECURICA

0247: request_model #GANG01

 

:Label03171D

0001: wait 0 ms

00D6: if 21

8248: NOT model #SECURICA available

8248: NOT model #GANG01 available

004D: jump_if_false £Label03173B

0002: jump £Label03171D

 

:Label03173B

0001: wait 0 ms

016A: fade 1 (back) 1500 ms

03AD: set_rubbish 0 (invisible)

03AF: set_streaming 1 (enabled)

0001: wait 0 ms

01B4: set_player $PLAYER_CHAR frozen_state 0 (frozen)

02A3: toggle_widescreen 1 (on)

0001: wait 2000 ms

00BC: text_highpriority "LOVE2_B" 4000 ms 1 ;; apart from an outbreak of plague......but that might be going too far in this case.

0001: wait 4000 ms

0002: jump £Label03177D

 

:Label03177D

0001: wait 500 ms

016A: fade 0 () 1500 ms

0001: wait 1500 ms

016A: fade 1 (back) 1500 ms

02A3: toggle_widescreen 0 (off)

01B4: set_player $PLAYER_CHAR frozen_state 1 (unfrozen)

0001: wait 0 ms

00A5: $621 = create_car #SECURICA at 172.0 -955.0 27.0

0129: $622 = create_actor 4 #GANG01 in_car $621 driverseat

0186: $623 = create_marker_above_car $621

00A9: set_car $621 to_normal_driver

02C2: car $621 drive_to_point 159.0 205.0 11.0

0002: jump £Label0317E2

 

:Label0317E2

0001: wait 0 ms

00D6: if 0

01AD: car $621 0 ()near_point 159.0 205.0 2.0 2.0

004D: jump_if_false £Label031828

016A: fade 0 () 1500 ms

0001: wait 1500 ms

009B: destroy_actor_instantly $622

00A6: destroy_car $621

016A: fade 1 (back) 1500 ms

0002: jump £Label031B7B

 

:Label031828

00D6: if 0

8185: NOT car $621 health >= 550

004D: jump_if_false £Label0318A3

00A8: set_car $621 to_psycho_driver

00AD: set_car $621 max_speed_to 40.0

02C2: car $621 drive_to_point 159.0 205.0 11.0

0002: jump £Label03185D

 

:Label03185D

0001: wait 0 ms

00D6: if 0

01AD: car $621 0 ()near_point 159.0 205.0 2.0 2.0

004D: jump_if_false £Label0318A3

016A: fade 0 () 1500 ms

0001: wait 1500 ms

009B: destroy_actor_instantly $622

00A6: destroy_car $621

016A: fade 1 (back) 1500 ms

0002: jump £Label031B7B

 

:Label0318A3

0001: wait 0 ms

00D6: if 0

00DC: player $PLAYER_CHAR driving $621

004D: jump_if_false £Label0318D4

0164: disable_marker $623

018A: $624 = create_checkpoint_at 436.0 -1475.0 18.0

0002: jump £Label0318EB

 

:Label0318D4

00D6: if 0

0119: car $621 wrecked

004D: jump_if_false £Label0318A3

0002: jump £Label031B7B

 

:Label0318EB

0001: wait 0 ms

00D6: if 0

0121: player $PLAYER_CHAR in_zone "YAKUSA"

004D: jump_if_false £Label03192A

00D6: if 0

8118: NOT actor $622 dead

004D: jump_if_false £Label031A55

010D: set_player $PLAYER_CHAR wanted_level_to 3

0164: disable_marker $624

0002: jump £Label0319B0

 

:Label03192A

00D6: if 0

0119: car $621 wrecked

004D: jump_if_false £Label031941

0002: jump £Label031B7B

 

:Label031941

00D6: if 0

80DC: NOT player $PLAYER_CHAR driving $621

004D: jump_if_false £Label0318EB

0186: $623 = create_marker_above_car $621

0164: disable_marker $624

0002: jump £Label031968

 

:Label031968

0001: wait 0 ms

00D6: if 0

00DC: player $PLAYER_CHAR driving $621

004D: jump_if_false £Label031999

0164: disable_marker $623

018A: $624 = create_checkpoint_at 436.0 -1475.0 18.0

0002: jump £Label0318EB

 

:Label031999

00D6: if 0

0119: car $621 wrecked

004D: jump_if_false £Label031968

0002: jump £Label031B7B

 

:Label0319B0

0001: wait 0 ms

00D6: if 0

010F: player $PLAYER_CHAR wanted_level > 0

004D: jump_if_false £Label031A40

0002: jump £Label0319CD

 

:Label0319CD

00D6: if 0

0119: car $621 wrecked

004D: jump_if_false £Label0319E4

0002: jump £Label031B7B

 

:Label0319E4

00D6: if 0

80DC: NOT player $PLAYER_CHAR driving $621

004D: jump_if_false £Label0319B0

0186: $623 = create_marker_above_car $621

0002: jump £Label031A06

 

:Label031A06

0001: wait 0 ms

00D6: if 0

00DC: player $PLAYER_CHAR driving $621

004D: jump_if_false £Label031A29

0164: disable_marker $623

0002: jump £Label0319B0

 

:Label031A29

00D6: if 0

0119: car $621 wrecked

004D: jump_if_false £Label031A06

0002: jump £Label031B7B

 

:Label031A40

018A: $624 = create_checkpoint_at 436.0 -1475.0 18.0

0002: jump £Label031A55

 

:Label031A55

0001: wait 0 ms

00D6: if 0

01AD: car $621 0 ()near_point 436.0 -1475.0 2.0 2.0

004D: jump_if_false £Label031AB0

01B4: set_player $PLAYER_CHAR frozen_state 0 (frozen)

016A: fade 0 () 1500 ms

0001: wait 1500 ms

012A: put_player $PLAYER_CHAR at 436.0 -1475.0 18.0 and_remove_from_car

00A6: destroy_car $621

0164: disable_marker $624

016A: fade 1 (back) 1500 ms

0002: jump £Label031B36

 

:Label031AB0

00D6: if 0

0119: car $621 wrecked

004D: jump_if_false £Label031AC7

0002: jump £Label031B7B

 

:Label031AC7

00D6: if 0

80DC: NOT player $PLAYER_CHAR driving $621

004D: jump_if_false £Label031A55

0164: disable_marker $624

0186: $623 = create_marker_above_car $621

0002: jump £Label031AEE

 

:Label031AEE

0001: wait 0 ms

00D6: if 0

00DC: player $PLAYER_CHAR driving $621

004D: jump_if_false £Label031B1F

0164: disable_marker $623

018A: $624 = create_checkpoint_at 436.0 -1475.0 18.0

0002: jump £Label031A55

 

:Label031B1F

00D6: if 0

0119: car $621 wrecked

004D: jump_if_false £Label031AEE

0002: jump £Label031B7B

 

:Label031B36

0004: $14D = 1 ;; integer values

01B4: set_player $PLAYER_CHAR frozen_state 1 (unfrozen)

01E3: text_1number_styled "M_PASS" 3000 5000 ms 1 ;; MISSION PASSED! $~1~

0394: play_music 1

0110: clear_player $PLAYER_CHAR wanted_level

0109: player $PLAYER_CHAR money += 3000

0318: set_latest_mission_passed "LM4" ;; 'PUMP-ACTION PIMP'

004F: create_thread ££Label00A920

0051: return

 

:Label031B7B

00BA: text_styled "M_FAIL" 3000 ms 1 ;; MISSION FAILED!

0051: return

 

:Label031B8C

0164: disable_marker $623

0164: disable_marker $624

0004: $ONMISSION = 0 ;; integer values

00D8: mission_cleanup

0051: return

 

Poor isn't it?

O.K. What do I want? 1. Some advices. What should be and what shouldn't be in a code. All my missions are similar in..style(simple, almost no integers or sth) 2. Why the guy acts strange. I tought normal driver should use roads instead of cutting the corners. 3. Rate ( if there is what to rate)

Thank you for helping.

Share this post


Link to post
Share on other sites
Demarest

Why aren't you using custom labels?

 

Your code is riddled with unnecessary waits. For example, the first one is unnecessary. Why have a wait 0 when 3 commands later, you have another one? And since you HAVE put the wait for the is model loaded loop up front, you could flip that if check to make your code more concise. But back to the point of waits: As soon as the code leaves the is model loaded loop, it encounters another wait. Totally unnecessary. Only have yet another totally unnecessary one 4 commands later. And so on.

 

Code runs linearly so anytime you have something like this

0002: jump £Label03177D:Label03177D

...you can get rid of the jump altogether. It accomplishes nothing because if it's not there, the code will continue to process commands just the same.

 

The code blocks under Label0317E2 and Label03185D are identical except for the JF address. Which means you could use a gosub to cut down on the code. Or since the end of the identical codes use a jump command, you could instead of gosubbing, simply jumping to a chunk of code that's identical in both spots like this

:Label0317E20001: wait 0 ms00D6: if 001AD: car $621 0 ()near_point 159.0 205.0 2.0 2.00002: jump £LabelCODECONSOLIDATION;---somewhere else in your code:LabelCODECONSOLIDATION004D: jump_if_false £Label031828016A: fade 0 () 1500 ms0001: wait 1500 ms009B: destroy_actor_instantly $62200A6: destroy_car $621016A: fade 1 (back) 1500 ms0002: jump £Label031B7B

 

 

Because this is coded like a mission, you're able to forego the need for is player defined checks. However, you still need to check is car wrecked in between any wait and any command/conditional that references a car. I see you included that at one point, but only after you've referenced the car. You'll need to change that.

 

Here's another example of an if check you could flip to consolidate your code

:Label0319CD00D6: if 00119: car $621 wrecked004D: jump_if_false £Label0319E40002: jump £Label031B7B:Label0319E400D6: if 0

Could just as easily (and more concisely) be written as

:Label0319CD00D6: if 08119:   NOT  car $621 wrecked004D: jump_if_false £Label031B7B00D6: if 0

If anything about that process does not make sense to you, ask. The important thing to remember is that if you have more than one conditional, flipping is not just negating each conditional and swapping the jump/JF addresses, but also switching the if check from an OR check to an AND or vice versa.

 

Last, but certainly not least, your code has no remove references from actor or car commands. Since your code has one of each, you'll need that as part of AT LEAST your cleanup section of code.

 

Any questions, ask. If any of the above does not make sense, ask. I don't mind taking my time to make sure somebody who's not afraid to put forth effort learns all that they need to smile.gif

Share this post


Link to post
Share on other sites
BEGINit

Demarest, you are the best. I will check this mission ( and all others) and post later. One question: what might happen if i do not use remove references?

Share this post


Link to post
Share on other sites
Demarest
what might happen if i do not use remove references?

The game will later appear to crash for no reason when in fact the reason is a memory overflow.

Share this post


Link to post
Share on other sites
BEGINit

HEY! That's why my game sometimes crashes ''without a reason.''

Share this post


Link to post
Share on other sites
BEGINit

Hello. What is the difference between 01CB: actor $a kill actor $b and 01C9: actor $a kill actor $b ?

01CB and 01C9? And one more thing. I wrote actor kill_actor for about 30 gang members (smth. like gang war), but some of them works and some just stands still. What could be wrong. Thanks for answereing.

Share this post


Link to post
Share on other sites
Demarest
As it always will be, the answer is to immitate existing code. Both are used in original code with no apparent difference. The opcode database doesn't document any known difference. Without additional code, there's no telling how/why it doesn't work for you. I will say this: When searching original code, one turns up first in Her Lover (point blank) and the other turns up first in Bait (long distance).

Share this post


Link to post
Share on other sites
BEGINit

I was using 01CB. I changed it into 01C9 and everything works now. One more question. Is it possible to add news on radio. I mean when passed sayonara salvatore you hear that calahan bridge is repaired on radio. The same is about SI - SSV bridge and Vice city storm (yes, I want to know about both GTA). So, is it possible to ADD new news in the game?

Share this post


Link to post
Share on other sites
grovespaz

Well, those two things are controlled using this opcode:

 

CODE057D: play mp3 (flag)

 

 

 

flags:

 

0? - bridges closed (bclosed.mp3)

1? - bridges open (bopen.mp3)

2 on - mp3's in order except abient sounds and (bclosed/ bopen)

 

This Opcode plays MP3s, 0 and 1 are the hurricane warnings, after that, it plays through MP3s in alphabetical order, except the ambience ones and the hurricane ones again (don't know how it knows, but it does).

 

Just play with it wink.gif

 

(BTW, this is copied from the opcode topic)

Share this post


Link to post
Share on other sites
Demarest
grovespaz is talking about VC. In GTA3, the incorrectly named opcodes of staunton_complete and shoreside_complete trigger those news adverts. The latter also activates the lift bridge. Because it is needed for the lift bridge, any GTA3 mod that's intended to be opened up needs that command. So I blanked the audio for that announcement so I wouldn't have to hear it all the time. Which means yes, you could change it to say other things.

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  

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