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

A little help with coding..


BEGINit
 Share

Recommended Posts

Hello... It's been a while since I coded last time... well, maybe I forgot something or what...I dont know, but looks like Im not as good at coding as I was before... anyway. I have a problem. I wanted to make a drug dealing script in VC for my mod (which was left dying for months, but i decided to return). Well heres is the code:

 

 

:a  0001: wait  0 ms00D6: if  0 0256:   player $PLAYER_CHAR defined  004D: jump if false ££a00D6: if  00038:   $ar ==  0  \\ integer values 004D: jump if false ££i0054: store_player $PLAYER_CHAR position_to $1E98 $1E99 $1E9A04C4: create coordinate $1 $2 $3 from actor $PLAYER_ACTOR offset  400.0  -475.2  0.002C0: set $A65 $A66 $1BF to ped path coords closest to $1 $2 $3 0376: $army = create random actor $A65 $A66 $1BF0004: $ar =  1  \\ integer values  0187:  $p = create marker above actor $army  018B: show on radar $p  2:i  00D6: if  0 80E9:   NOT   player $PLAYER_CHAR  0 ()near actor $army radius  500.0  500.0004D: jump if false ££x0004: $ar =  0  \\ integer values 009B: destroy actor instantly $army 0164: disable_marker $p :x   00D6: if  0 0184:   actor $army health >=  95004D: jump if false ££d 00D6: if  0   00E9:   player $PLAYER_CHAR  0 ()near actor $army radius  1.0  1.0 004D: jump if false ££a020F: actor  $army look_at_player $PLAYER_CHAR 022C: set actor $PLAYER_ACTOR to look at actor $army0372: set_actor $PLAYER_ACTOR anim  31 wait_state_time  2000 ms  0372: set_actor $army anim  31 wait_state_time  2000 ms0109: player $PLAYER_CHAR money += 200:d  0004: $ar =  0  \\ integer values0164: disable_marker $p01C2: remove references to actor $army0002: jump ££a

 

 

It is in the main section of the script and there is no difference whether you are on mission or not. The thing is after several deals the game crashes. I hope someone will explain me the problem. Thank you.

Link to comment
Share on other sites

At first the game will crash if player is not near army radius 500 because after destroying army in part :i

the code runs directly into the check of :x

00D6: if 0

0184: actor $army health >= 95

004D: jump if false ££d

 

 

after several deals the game crashes

Because the wait_state_time codes will be read permanent, at 1000 times per second

you must build in a switch to check a time of a few sekundes before wait_state_time codes should be read again

or a check so the player must first leave the spot before he can start the deal again.

Link to comment
Share on other sites

About that :i to :x jump... well, I noticed that and fixed cool.gif but that all wait_state_time thing... I didnt think about that at all. Thank you ZAZ. I will try to fix that and will write if I managed to do that. Thanx again smile.gif

Link to comment
Share on other sites

Ok, now I feel dumb. Could someone show me, how to fix this, because I cant get it right. Please...

Link to comment
Share on other sites

HELP!! My main.scm suddenly became:

 

 

0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)0000: (unknown)

 

 

What the hell happened? Is it possible to bring back the "normal" code? Or all my game is gone forever and I should kill cryani.gif myself? cryani.gif

I still have a little hope, because it still decompiles missions 0 to 54 (my missions) cryani.gif

Edited by BEGINit
Link to comment
Share on other sites

I just wanned to play my VC one morning, but after turning it on the game crashed. I opened my main and found this... sad.gif

Link to comment
Share on other sites

 

I just wanned to play my VC one morning, but after turning it on the game crashed. I opened my main and found this... sad.gif

So the compile process failed ?

Make shure that you have enough freespace on that drive where the builded main.scm will be stored.

Maybe you can upload your main.txt and we test it in our MB

which MB version do you have ?

Link to comment
Share on other sites

I have BW VC mission builder v1.1 but I tried to open with v1.3 and Sanny builder. The same. When I opened main.scm.txt - I found the same. What is interesting, that a part of a code is normal, but from certain point it becomes 000: (unknown) I put a link tu txt when i finish uploading it.

Edited by BEGINit
Link to comment
Share on other sites

Umm so, is there anyone who knows if its possible to restore that 0000: (unknown) thing to a normal script? It would be great to get an answer ASAP cryani.gif

Link to comment
Share on other sites

C'mon guys..I'm getting depressed cryani.gif

Link to comment
Share on other sites

There's no way to restore the code - why didn't you keep a copy of the decompiled (plain-text) script?

Link to comment
Share on other sites

 

C'mon guys..I'm getting depressed  cryani.gif

What you uploaded is a main.txt which was decompiled from your modded main.scm

A big part was gone by compiling I assume.

I had the same phenomenon as my freespace was gone.

I modified mains and stored it by new name and again and again.

And at anytime the freespace of that partition was gone which was used to store the compiled main

 

Maybe other reasons could make disruption

for exemble by using a other specific programm at same time as compile process

 

You should always keep the basic original main.txt of your modified version.

If not its very very sh*t

Link to comment
Share on other sites

Impossible? Damn... thats frustrating... cryani.gif well I had a backup with...ummm... 40missions...and the lost one was with...54 I think... What a pitty. Thanks for answering anyway... now I do backup everytime I make a mission...

Link to comment
Share on other sites

Hello, I'd like to ask a few questions(about VC):

 

1. Is it possible to make actor walk and use cellphone at the same time? Well when i try tu use actor walk and hold cellphone opcodes at the same time, actor only walks, but doesnt use cellphone. In one mission I made a condition actor walk and if actor in that point it starts using cellphone. The thing is that he walks while using cellphone, BUT he doesnt stop walking even if he reaches the point.

 

2. I dont really understand how to take pictures in VC. I use opcode 04C5 which seems is if photo of a certain actor is taken (checked in original script and san andreas) piece of the code:

 

 

:pic0001: wait 0 ms00D6: if  0 04C5: $bos004D: jump if false £pic 0213: $dgts = create pickup -120 (BRIEFCASE) type  2 at  -972.128 -757.500 19.665

 

 

player has a camera, but when I take photos of actor $bos, nothing happens.

 

3. I wanted to make smoke. but when I used create gas smoke opcode, nothing happened. When I looked into the original code I didnt find anything (except that the gasgrenade is loaded). What do I need to do to make as. Do I really need to load gasgrenade?

 

Thanks for answering...

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.