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. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

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

      1. Recruitment
    2. Events

    1. GTA Online

      1. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    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 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 Mods
    10. GTA Vice City

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

      1. Guides & Strategies
      2. Help & Support
      3. GTA 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  
devilfish

Trying to make store robbing possible

Recommended Posts

devilfish

Hello all

 

Firstly, I'd like to state that english isn't my primary language so my writing can look strange tounge.gif

 

Like the topic says, I'm desperately trying to make store robbing possible for San Andreas, like in Vice City. I was very dissapointed when I found out that this feature isn't in SA...

 

I have some kind of basic understanding in mission coding, like placing pickups, weapons and cars on the map. tounge.gif

 

I don't have Vice City anymore on my computer (sold it to get money for SA), so could someone maybe post the store rob code here that I could translate it or imitate it for SA to ease up things and have a base for my work. SA's and VC's code language is somewhat identical, right? smile.gif

 

But if I don't get VC's code, I'd like to keep it simple:

When you go to a store, 24/7 or Binco for example, there would be a red little sphere in front of the shopkeepers desk (only if you have a weapon equiped) You'd have to stay in the sphere and you start receiving money(up to a maximum amount). Then, when you leave the sphere an alarm will go off and you get a wanted level of 3 or 4.

Another method would be that there would be not any kind of sphere or marker, you'd have to just aim at the shopkeeper and he/she would start giving you money, Like in Vice City turn.gif

 

Any kind of ideas, suggestions and more importantly, help are more than welcome, anything!! smile.gif

Edited by devilfish

Share this post


Link to post
Share on other sites
random_download

I think this opcode may be what you want judging from the description:

 

0457:   player $PLAYER_CHAR aiming_at_actor @101

 

You could loop that and then have a timer for the alarm to be set off and the player gets a wanted level.

This should work as long as 0457 works in SA.

 

:loop0001: wait 100 [email protected] = 0;timer00D6: if 00457:   player $PLAYER_CHAR aiming_at_actor $storekeeperjf ££loop:loop20001: wait 1000 [email protected] += 100000D6: if 00457:   player $PLAYER_CHAR aiming_at_actor $storekeeperjf ££loop0109: player $PLAYER_CHAR money +=  2000D6: if [email protected] >= 5000jf ££loop201C0: @1 = player $PLAYER_CHAR [email protected] += 100D6: if [email protected] >= 4jf ££[email protected] = 4:loop2cont010D: set_player $PLAYER_CHAR wanted_level_to  @10002: jump ££loop2

 

Share this post


Link to post
Share on other sites
devilfish

Wow, thanks for the code, I'll try it out. smile.gif

 

EDIT: Damn... whatsthat.gif

Well, I played around with the code, but didn't get it to work. I placed it right above Mission 0, and created a thread for it... do I even need to create a thread for it? Do I need to add something to that code?

 

And yes, 0457 should work cause give'n take mod uses it...

Edited by devilfish

Share this post


Link to post
Share on other sites
random_download

You need a create_thread for ££loop and yes, just put the code above mission 0. You will need to change $storekeeper to whatever the var for the actual store keeper is. Or, you could create your own ped when the player is in the shop and name it $storekeeper.

Share this post


Link to post
Share on other sites
Demarest

Using local vars instead of global ones are more efficient. This will only apply if you have this thread create the shopkeep. If you're using the one from another thread, then obviously it must remain global.

 

Also, setting @0 to 0 and then adding 1000 to it every wait 1000 is redundant. In GTA3/VC, use @16 or @17 (in SA, @32 or @33) and the game will increment them 1 for every millisecond waited automatically.

Share this post


Link to post
Share on other sites
devilfish

YYEEESS! It works! It works! turn.gif

There are multiple 'storekeepers' in the game, I used cloth shop's storekeeper's var: $9981 to test.

I found the right var by searching the script with this:

0457: player $PLAYER_CHAR aiming_at_actor $

 

Eventually, I found shopkeeper vars for Ammunation, fast food places, tattoo shops and barber shops. I haven't found 24/7's sk's var or sex shop's or any else shop's which has a sk though...

 

Ammunation's shopkeeper's var: $9540

Well, if I make possible to rob Ammunation, it wouldn't be a good idea to try to rob him cause he has a gun! biggrin.gif

Tattoo shops: $9645

Barber shops: $9731

Fast food place: $10032

 

Now my point is that how do I add these addittional vars to the code?

This didn't work (only robbing in fast food places work with this code)

 

:loop0001: wait 100 [email protected] = 0;timer00D6: if 00457:   player $PLAYER_CHAR aiming_at_actor $99810457:   player $PLAYER_CHAR aiming_at_actor $95400457:   player $PLAYER_CHAR aiming_at_actor $96450457:   player $PLAYER_CHAR aiming_at_actor $97310457:   player $PLAYER_CHAR aiming_at_actor $10032jf ££loop:loop20001: wait 1000 [email protected] += 100000D6: if 00457:   player $PLAYER_CHAR aiming_at_actor $99810457:   player $PLAYER_CHAR aiming_at_actor $95400457:   player $PLAYER_CHAR aiming_at_actor $96450457:   player $PLAYER_CHAR aiming_at_actor $97310457:   player $PLAYER_CHAR aiming_at_actor $10032jf ££loop0109: player $PLAYER_CHAR money +=  2000D6: if [email protected] >= 5000jf ££loop201C0: @1 = player $PLAYER_CHAR [email protected] += 100D6: if [email protected] >= 2jf ££[email protected] = 2:loop2cont010D: set_player $PLAYER_CHAR wanted_level_to  @10002: jump ££loop2

 

 

And how to find the other storekeepers? whatsthat.gif

And Thank You SO MUCH for helping me people! rah.gif

Share this post


Link to post
Share on other sites
random_download

For each conditional you have you must add one to the if number. You want 5 so your number would be 4 (as 1 conditional = if 0). You also want the code to execute if the player is aiming at one actor, so you want an OR statement instead of an AND statement. To do this add 20 to the if number. So you end up with if 24.

 

:loop0001: wait 100 [email protected] = 0;timer00D6: if 240457:   player $PLAYER_CHAR aiming_at_actor $99810457:   player $PLAYER_CHAR aiming_at_actor $95400457:   player $PLAYER_CHAR aiming_at_actor $96450457:   player $PLAYER_CHAR aiming_at_actor $97310457:   player $PLAYER_CHAR aiming_at_actor $10032jf ££loop:loop20001: wait 1000 ms00D6: if 240457:   player $PLAYER_CHAR aiming_at_actor $99810457:   player $PLAYER_CHAR aiming_at_actor $95400457:   player $PLAYER_CHAR aiming_at_actor $96450457:   player $PLAYER_CHAR aiming_at_actor $97310457:   player $PLAYER_CHAR aiming_at_actor $10032jf ££loop0109: player $PLAYER_CHAR money +=  2000D6: if [email protected] >= 5000jf ££loop201C0: @1 = player $PLAYER_CHAR [email protected] += 100D6: if [email protected] >= 2jf ££[email protected] = 2:loop2cont010D: set_player $PLAYER_CHAR wanted_level_to  @10002: jump ££loop2

 

 

@Dem: Ah, it is @32 and @33 in SA, wasn't sure which oes they were now blush.gif

Share this post


Link to post
Share on other sites
Demarest
Just to add what random said, the limit of conditionals is 8 per if check. So you'll be using numbers between 0-7 or 21-27.

Share this post


Link to post
Share on other sites
superglitch
Just to add what random said, the limit of conditionals is 8 per if check. So you'll be using numbers between 0-7 or 21-27.

0+20=21?????

 

I thought math was easy

 

jk

Yay just one less thing the LVS team to figure out

Share this post


Link to post
Share on other sites
Demarest
How do you propose to argue OR ONE conditional? sly.gif

Share this post


Link to post
Share on other sites
devilfish
Just to add what random said, the limit of conditionals is 8 per if check. So you'll be using numbers between 0-7 or 21-27.

Yea, thanks, now I understand the if command completely. smile.gif

Everything works now. Thanks again guys, without help I wouldn't have pulled this off myself, atleast not so quickly. smile.gif

I'm off to play around with the code and maybe add something new to it and then release it.

Share this post


Link to post
Share on other sites
Dillyracer

question of this mod works will you have to start a new game ?

Share this post


Link to post
Share on other sites
random_download

Yes you have to start a new game.

Share this post


Link to post
Share on other sites
Viscera

Any updates on this mod how is it coming?

Share this post


Link to post
Share on other sites
mageezer

Doesnt work for me sad.gif My money doesnt increase when i target any of the shopkeepers, nor do any alarms go off. Do I just copy the code that random_download made directly above the mission 0, under the MOB_GF section?

Share this post


Link to post
Share on other sites
random_download

You need to change the variables of the actor to whatever the variable is in the main.scm for the actual shopkeepers. Then it will work.

Share this post


Link to post
Share on other sites
StormyWeathers

Like other(s) before...

 

I put the lines in front of mission 0 and after the mob-lines. Didn't work! I don't understand what you mean with the variables. Can you be more precise? Is modding that difficult or am i dumb(er)?

 

Greetz, S.

 

(Later that night)

 

It worked... i managed to get some 'doekoe' when i pointed out my gun to the shopmembers. Didn't noticed the alarm thou... have to test it again i assume.

 

Gotta to find the code for the 24-7! That's why i wanted to have this anyway. Nice mod! Another thing, a litte bit off-topic. When i put in the give n take lines, i constantly get a error about some limitations. Anybody got a idea??

 

Greetz, Stormy

Edited by StormyWeathers

Share this post


Link to post
Share on other sites
mageezer

nope, still doesnt work for me, the variables are exactly the same in my main.scm as they are in that code.

Share this post


Link to post
Share on other sites
StormyWeathers

Hi all,

 

Tried to paste the lines in the AK-mod. It doesn't work... What can possible went wrong? It worked with CNS mod but that mod contains stuff i do not want to have. The AK-mod provides me with the right part of the CNS but somehow it shows only errors.

 

Greetings

Share this post


Link to post
Share on other sites
random_download
nope, still doesnt work for me, the variables are exactly the same in my main.scm as they are in that code.

Are you sure that you went into the right shop? The code you want is:

 

:loop0001: wait 100 [email protected] = 0;timer00D6: if 240457:   player $PLAYER_CHAR aiming_at_actor $99810457:   player $PLAYER_CHAR aiming_at_actor $95400457:   player $PLAYER_CHAR aiming_at_actor $96450457:   player $PLAYER_CHAR aiming_at_actor $97310457:   player $PLAYER_CHAR aiming_at_actor $10032jf ££loop:loop20001: wait 1000 ms00D6: if 240457:   player $PLAYER_CHAR aiming_at_actor $99810457:   player $PLAYER_CHAR aiming_at_actor $95400457:   player $PLAYER_CHAR aiming_at_actor $96450457:   player $PLAYER_CHAR aiming_at_actor $97310457:   player $PLAYER_CHAR aiming_at_actor $10032jf ££loop0109: player $PLAYER_CHAR money +=  2000D6: if [email protected] >= 5000jf ££loop201C0: @1 = player $PLAYER_CHAR [email protected] += 100D6: if [email protected] >= 2jf ££[email protected] = 2:loop2cont010D: set_player $PLAYER_CHAR wanted_level_to  @10002: jump ££loop2

 

But there are only 5 shop actors there, so if you were aiming at one which isn't in my code then nothing will happen.

Share this post


Link to post
Share on other sites
mageezer

 

:MOB_GF_5480001: wait  100 ms0006: @32 =  0 ;; integer values00D6: if  240457:   player $PLAYER_CHAR aiming_at_actor $99810457:   player $PLAYER_CHAR aiming_at_actor $95400457:   player $PLAYER_CHAR aiming_at_actor $96450457:   player $PLAYER_CHAR aiming_at_actor $97310457:   player $PLAYER_CHAR aiming_at_actor $100320457:   player $PLAYER_CHAR aiming_at_actor $9477004D: jump_if_false ££MOB_GF_548:MOB_GF_5580001: wait  1000 ms00D6: if  240457:   player $PLAYER_CHAR aiming_at_actor $99810457:   player $PLAYER_CHAR aiming_at_actor $95400457:   player $PLAYER_CHAR aiming_at_actor $96450457:   player $PLAYER_CHAR aiming_at_actor $97310457:   player $PLAYER_CHAR aiming_at_actor $100320457:   player $PLAYER_CHAR aiming_at_actor $9477004D: jump_if_false ££MOB_GF_5480109: player $PLAYER_CHAR money +=  2000D6: if  00029:   @32 >=  5000 ;; integer values004D: jump_if_false ££MOB_GF_55801C0: @1 = player $PLAYER_CHAR wanted_level000A: @1 +=  1 ;; integer values00D6: if  00029:   @1 >=  2 ;; integer values004D: jump_if_false ££MOB_GF_5770006: @1 =  2 ;; integer values:MOB_GF_577010D: set_player $PLAYER_CHAR wanted_level_to @10002: jump ££MOB_GF_558;-------------Mission 0---------------; Originally: Initial 1

 

 

That's my code (the mob_gf is what the :loop changed to when i compile it) The 9477 variable is the bartender at the strip club (i think). This doesnt work, and neither does the code you just posted. I've aimed at the binco shopkeeper, the pizza stack guy, old reece from the barbershop and the tattoo guy in LS, all for at least 20 seconds. No effect whatsoever sad.gif

Share this post


Link to post
Share on other sites
StormyWeathers

 

nope, still doesnt work for me, the variables are exactly the same in my main.scm as they are in that code.

 

But there are only 5 shop actors there, so if you were aiming at one which isn't in my code then nothing will happen.

Is there definitly no actor-variable of the 24-7's and the bars and so? You know that or are you also unaware of this?

 

Stormy

Share this post


Link to post
Share on other sites
random_download

@mageezer: you need to change the two if 24s to if 25s, as you have added another conditional.

You should aim at the actor for one second, and then your money starts to go up. You get $20 for each second you aim at the actor, and every 5 seconds you do this your wanted level will increase by 1 until you get to 2 stars. Hmm... I think I meant to put 4 there, meh.

 

@StormyWeathers: there will be a var for every shopkeeper, if you look through your scm you will be able to find them all and add them to the checks.

Share this post


Link to post
Share on other sites
StormyWeathers

 

@mageezer: you need to change the two if 24s to if 25s, as you have added another conditional.

You should aim at the actor for one second, and then your money starts to go up. You get $20 for each second you aim at the actor, and every 5 seconds you do this your wanted level will increase by 1 until you get to 2 stars. Hmm... I think I meant to put 4 there, meh.

Still doesn't work for me with the AKmod from the gtagarage. Changed values to both 25 but still no extra cash for robberies. Like mageezer the loop changed to mob_GF and some number, i believe its 1124!

 

greetz

 

Later that night...

 

I have managed to get it work! I used the AKlite mod (without the give and take, what a bummer!) and there it is... Now i have to find the vars of the 24-7's and so... anyone an idea?

 

goodnight!

 

 

 

Edited by StormyWeathers

Share this post


Link to post
Share on other sites
mageezer

btw, my main.scm has hot coffee enabled and craig kostelesky's all opened up mod, plus some of my own parked cars and weapon pickups. Should that matter at all?

 

Also, just out of interest, why can't i find the model names of the actual peds in the main.scm anywhere? im only just getting into main.scm modding, but shouldn't there be at least the peds ID in the peds.ide file or something?

 

EDIT: Still isnt working. I changed the 24 to 25 but still nothing. I've even tried using the joystick configuration, where you can lock on to people like in the ps2 version - no luck.

Edited by mageezer

Share this post


Link to post
Share on other sites
mageezer

Firstly, soz for the double post, Secondly, i finally got it working. I just added a new create_thread line at the top and changed the name of the thread to robbery. Ironicly, it was just as i'd added the AK mod, the very same mod that made Stormy Weather's one stop working! confused.gif

 

EDIT: Two changes i'd like to see made, firstly the addition of the 24-7 guy, which i know we're still looking for, and secondly, for the cash flow to stop after you've received $250 (a little unrealistic for the shops to have unlimited money, otherwise you could continue getting money forever as police dont enter the shops unless you have about 5 stars)

Edited by mageezer

Share this post


Link to post
Share on other sites
random_download

Seeing as some people are having some trouble getting this to work, I have a compiled version using Demarest's darkpact method so you can use this mod with your savegames. link

 

EDIT: Link fixed.

Edited by random_download

Share this post


Link to post
Share on other sites
StormyWeathers

I found something in the main.scm what seems to be a variable for shopkeepers + barstaff. $1257! But it doesn't work when a put an extra line in. Is there more that i must do?

 

Greets

Share this post


Link to post
Share on other sites
random_download

Did you change the if statemnet to if 26?

Share this post


Link to post
Share on other sites
StormyWeathers

Tried it with 25 with 6 lines incl. $1257

Tried it with 26 with 7 lines incl. $1256, 1257. This one crashed the game.

 

So far... nothing!

 

EDIT: Does it matter when the main.scm tells you it is @0 $1257? I tried to compile it but it says there are 2 much parameters.

Edited by StormyWeathers

Share this post


Link to post
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
Sign in to follow this  

  • 1 User Currently Viewing
    0 Members, 0 Anonymous, 1 Guest

×

Important Information

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