Quantcast

Jump to content

» «
Photo

Editing Pickup Type 1 Price

20 replies to this topic
INH
  • INH

    Lead Coder for Freelance

  • Members
  • Joined: 04 Jul 2003

#1

Posted 24 August 2003 - 08:35 PM

To make a long story short, pickup type 1 is the weapon pickups used in AmmuNation in GTA3. In VC, using it with weapons other than M60, RPG-7, minigun, or remote nades will give you a $400 price tag. The other weapons have appropriate prices. There's no mention of it in .gxt, weapon.dat, or main.scm. I'm guessing its hardcoded, but I thought it would be worthwhile to ask you guys if you know anything or have seen anything about it. Demarest can't edit the prices in GTA3, either.

I want to use it to make black market arms dealers are Phil's and Cortez's yacht (I added a gangplank to it). Otherwise, I'd have to create an AmmuNation-style list, and I don't know positions to put weapons (not pickup, mind you) in the game.

Barton Waterduck
  • Barton Waterduck

    retired modder

  • Members
  • Joined: 12 Feb 2002

#2

Posted 25 August 2003 - 08:13 AM Edited by Barton Waterduck, 25 August 2003 - 08:14 AM.

CODE

...
00D6: if  0?
010A:   player $PLAYER_CHAR money >  90000&&
004D: jump_if_false £<somewhere 1>
032B: $MolotovForSale = create_weapon_pickup #MOLOTOV 15? ammo 2000& at <x> <y> <z>
...
00D6: if 0?
0214:   pickup $MolotovForSale picked_up
004D: jump_if_false £<somewhere 2>
0109: player $PLAYER_CHAR money += -90000&&
00D6: if  0?
810A:   NOT  player $PLAYER_CHAR money >  90000&&
004D: jump_if_false £<somewhere 3>
0215: destroy_pickup $MolotovForSale
...


Demarest
  • Demarest

    what could be

  • BUSTED!
  • Joined: 12 Jul 2003

#3

Posted 25 August 2003 - 10:37 AM

Do these opcodes/this technique work in GTA3 as well? Also, this seems to be a great way to create pickups. Does this mean that the existing one are hard coded?

INH
  • INH

    Lead Coder for Freelance

  • Members
  • Joined: 04 Jul 2003

#4

Posted 26 August 2003 - 03:15 AM

I haven't touched code for a while, so maybe I'm just losing the golden touch. I'm not seeing how that defines the price. I see how that wouldn't let you buy it unless you had x money. Unless the 2000& is price...?

Demarest
  • Demarest

    what could be

  • BUSTED!
  • Joined: 12 Jul 2003

#5

Posted 26 August 2003 - 05:59 AM

QUOTE (INH @ Aug 25 2003, 22:15)
I haven't touched code for a while, so maybe I'm just losing the golden touch. I'm not seeing how that defines the price. I see how that wouldn't let you buy it unless you had x money. Unless the 2000& is price...?

When you pick it up, it deducts $90,000 from your current money. But first it checks if you even have that much before it lets you pick it up.

INH
  • INH

    Lead Coder for Freelance

  • Members
  • Joined: 04 Jul 2003

#6

Posted 28 August 2003 - 12:46 AM

Seems a bit pricey!

Barton Waterduck
  • Barton Waterduck

    retired modder

  • Members
  • Joined: 12 Feb 2002

#7

Posted 28 August 2003 - 08:25 AM Edited by Barton Waterduck, 28 August 2003 - 08:27 AM.

QUOTE (INH @ Aug 28 2003, 01:46)
Seems a bit pricey!

CODE

...
00D6: if  0?
010A:   player $PLAYER_CHAR money > <price>
004D: jump_if_false £<somewhere 1>
032B: $MolotovForSale = create_weapon_pickup #MOLOTOV 15? ammo <bottles> at <x> <y> <z>
...
00D6: if 0?
0214:   pickup $MolotovForSale picked_up
004D: jump_if_false £<somewhere 2>
0109: player $PLAYER_CHAR money += -<price>
00D6: if  0?
810A:   NOT  player $PLAYER_CHAR money >  <price>
004D: jump_if_false £<somewhere 3>
0215: destroy_pickup $MolotovForSale
...

Demarest
  • Demarest

    what could be

  • BUSTED!
  • Joined: 12 Jul 2003

#8

Posted 28 August 2003 - 10:05 AM

Come on, INH, you know better than that! The beauty of coding is that nothing is set in stone. Save for that which is hard-coded into the game.exe such as which icons appear in the AmmuNations and what their prices are.

Barton Waterduck
  • Barton Waterduck

    retired modder

  • Members
  • Joined: 12 Feb 2002

#9

Posted 28 August 2003 - 05:06 PM

QUOTE (Demarest @ Aug 28 2003, 11:05)
Come on, INH, you know better than that! The beauty of coding is that nothing is set in stone. Save for that which is hard-coded into the game.exe such as which icons appear in the AmmuNations and what their prices are.

90000 divided on 2000 bottles = 45 silver gta coins for each bottle.

INH
  • INH

    Lead Coder for Freelance

  • Members
  • Joined: 04 Jul 2003

#10

Posted 28 August 2003 - 10:12 PM

Wow, I'm just flabbergasted you thought I was stupid enough not to realize I can change it easily. That was just a little joke, guys.

Demarest
  • Demarest

    what could be

  • BUSTED!
  • Joined: 12 Jul 2003

#11

Posted 28 August 2003 - 11:10 PM

QUOTE (INH @ Aug 28 2003, 17:12)
Wow, I'm just flabbergasted you thought I was stupid enough not to realize I can change it easily. That was just a little joke, guys.

I don't think anybody thought you were stupid. I could've PMed you my post and accomplished the same goal if I thought you were stupid. I said it publically because others might read the post and think that Molotov's have to cost that much. I said what I said in case somebody took those words out of context and put themselves into a mental prison. If you read what I said, it was that you're NOT stupid. And then I went on to explain (more for the public's benefit) the beauty of coding. Usually such sensitivity is only seen in women. I've never had to edit myself as much as I do in these forums. Maybe somebody can explain to me why everybody is so quick to take things the wrong way, fight, whatever?

INH
  • INH

    Lead Coder for Freelance

  • Members
  • Joined: 04 Jul 2003

#12

Posted 28 August 2003 - 11:47 PM

Well, I can say with certainty that patronizing posts do not help things one bit.

Barton Waterduck
  • Barton Waterduck

    retired modder

  • Members
  • Joined: 12 Feb 2002

#13

Posted 29 August 2003 - 07:14 AM

no problem, just make a better joke the next time. sigh.gif

Demarest
  • Demarest

    what could be

  • BUSTED!
  • Joined: 12 Jul 2003

#14

Posted 29 August 2003 - 09:42 AM

QUOTE (Barton Waterduck @ Aug 29 2003, 02:14)
no problem, just make a better joke the next time. sigh.gif

Doesn't seem possible around here. Everybody would rather assume the worst.

@INH: Whatever dude. I'm not going to sit here and kiss your butt or beg for forgiveness or whatever when I didn't do anything wrong. Relax. If you take yourself less seriously you may enjoy life more.

redviper88
  • redviper88

    Player Hater

  • Members
  • Joined: 17 Feb 2004

#15

Posted 15 May 2005 - 11:16 PM

I know it's a bit late to reply to this topic, but I just found it and it sounds like a great solution for a problem I have.
The only thing is that it doesn't work.
When I pick up the pickup and don't have enough money to buy another one the game crashes.
I just copied the code from Barton and edited it with the right coordinates, ammo etc. but everytime it tries to destroy the pickup the game crashes.
Putting in a wait command before the destroy didn't help at all.
What am I doing wrong????

PatrickW
  • PatrickW

    GTA Juggernaut

  • Moderator
  • Joined: 07 Jan 2004
  • Netherlands

#16

Posted 16 May 2005 - 12:21 AM

This is indeed an ancient topic, but since your question is ontopic...

Instead of pointing to Barton's code, please post the appropriate section of your own code. That makes it much easier for us to spot the problem.


redviper88
  • redviper88

    Player Hater

  • Members
  • Joined: 17 Feb 2004

#17

Posted 16 May 2005 - 10:00 AM

Ok, here is my code.
I changed the type to 1 so that the pickup would respawn after 3 seconds (or so), because I cannot remember the type that also does this but is also free. (Am I making sense a bit?)
Hope someone knows a solution!

CODE
:Rvweapons
0001: wait 50 ms
00D6: if  0
010A:   player $PLAYER_CHAR money > 19
004D: jump_if_false ££Rvweapons
032B: $MolotovForSale = create_weapon_pickup #BAT 1 ammo 7 at 274.0 -1281.0 11.1

:Rvweaponsa
0001: wait 50 ms
00D6: if 0
0214:   pickup $MolotovForSale picked_up
004D: jump_if_false ££Rvweaponsa
0109: player $PLAYER_CHAR money += -10
00D6: if  0
810A:   NOT  player $PLAYER_CHAR money >  19
004D: jump_if_false ££Rvweaponsa
0215: destroy_pickup $MolotovForSale

random_download
  • random_download

    :o

  • Members
  • Joined: 07 Mar 2004

#18

Posted 16 May 2005 - 03:51 PM

Well that code seems fine, are you sure that whatever goes after the last opcode is not crashing the game? Try adding:
CODE
0002: jump ££Rvweapons
at the end.

redviper88
  • redviper88

    Player Hater

  • Members
  • Joined: 17 Feb 2004

#19

Posted 16 May 2005 - 05:46 PM

Thanks Random_Download, that was just what was wrong with it.
Now just to find out how I can create a free pickup that respawns rather quickly, but I think I know where to find that.

Y_Less
  • Y_Less

    629

  • Members
  • Joined: 14 Mar 2004

#20

Posted 18 May 2005 - 01:30 PM

To create a free one, just use that code without all the price code.

redviper88
  • redviper88

    Player Hater

  • Members
  • Joined: 17 Feb 2004

#21

Posted 21 May 2005 - 02:39 PM

Y_Less, that was not what I meant, I know I could just removed the code to create free pickups.
What I needed was to create a pickup that would respawn after 3 seconds.
But I just changed the code so that it removes the pickup after it's picked up and then wait 3 seconds before checking wether I have enough money for another one.
It is a little workaround but it is working none the less.
But thanks anyway for your reply.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users