Quantcast

Jump to content

» «
Photo

[SA] reduce the maximum number of munitions .

7 replies to this topic
Terreur69
  • Terreur69

    C2C - Down The Road

  • Members
  • Joined: 27 Dec 2010
  • France

#1

Posted 19 April 2012 - 11:55 AM

hi , how to reduce the maximum number of munitions that may have (max is 9999, can pass it to 100?)

if by script it would be perfect .

thank.

ChopTheDog.
  • ChopTheDog.

    War. War never changes.

  • Members
  • Joined: 31 May 2010
  • None

#2

Posted 19 April 2012 - 12:02 PM Edited by The_Sorrow, 19 April 2012 - 12:06 PM.

QUOTE (terreur69 @ Thursday, Apr 19 2012, 12:55)
hi , how to reduce the maximum number of munitions that may have (max is 9999, can pass it to 100?)

if by script it would be perfect .

thank.

I assume you mean the amount of ammo a gun is carrying, yes it can be done by script.

For San andreas use this opcode:
CODE
017B: set_actor $PLAYER_ACTOR weapon 22 ammo_to 10


For Vice city use this opcode:
CODE
017A: set_player $PLAYER_CHAR weapon 17 ammo_to 100


And for GTA 3 use this opcode:
CODE
017A: set_player $PLAYER_CHAR weapon 7 ammo_to 0


To give you an example of how to use these, I'm going to put them into a ' Key press ' script.

Using SA's code if the key ' 1 ' is pressed the amount of ammo in the gun will become 10, Like so:

CODE
{$CLEO}
0000:

:1
wait 0
if
0AB0:  key_pressed 0x31
jf @1

:2
017B: set_actor $PLAYER_ACTOR weapon 22 ammo_to 10 //-- Weapon 22 is a pistol
jump @1


For any future ' Scripting ' queries/requests please post in the III Coding thread

P.S - You will see the ' Requests ' topic pinned to the top!


lil weasel
  • lil weasel

    Shoot Looters, Hang Pirates!

  • Members
  • Joined: 25 Dec 2006
  • None
  • Contribution Award [San Andreas]

#3

Posted 19 April 2012 - 09:42 PM

You do realize that the maximum ammo count DISPLAYED is 9,999. When you exceed 9,999 the game no longer Displays the count. You have over 10,000 when it no longer displays.

GTASanAndreas12345
  • GTASanAndreas12345

    Square Civilian

  • Members
  • Joined: 07 Sep 2010

#4

Posted 19 April 2012 - 11:55 PM

There is no theoretical maximum to the ammunition of a weapon. The game stops displaying the amount over 9,999, but you could have much more than that.

Terreur69
  • Terreur69

    C2C - Down The Road

  • Members
  • Joined: 27 Dec 2010
  • France

#5

Posted 22 April 2012 - 07:52 AM

thank sorrow ,

but , it's not really her i seek, in fact, when we did a lot of ammunition, one is a 9999 (or more) so i asked whether it is possible that the maximun number of ammunition for each weapon is 100.

ChopTheDog.
  • ChopTheDog.

    War. War never changes.

  • Members
  • Joined: 31 May 2010
  • None

#6

Posted 22 April 2012 - 08:27 AM

Yes, This can be done by script.

You just create a ' Checking ' script to check if the ammo is over or equal too a hundred (100) and then use the script I gave you to manipulate the ammo, Make it higher (Over 9999) so the ammo isn't show on the gun icon (This happens when you reach 9999 or over)

This gives the impression that 100 is the maximum amount of ammo a gun can carry.

Th3MaN1
  • Th3MaN1

    Gangsta

  • Members
  • Joined: 24 Apr 2011
  • Romania

#7

Posted 23 April 2012 - 03:00 PM

If you want the limit to be just like in GTA 4,you could use oksa8's script which is right HERE.It's easy to use,just follow the instructions.Plus,you can edit the limit of each weapon's ammo to your liking.

Terreur69
  • Terreur69

    C2C - Down The Road

  • Members
  • Joined: 27 Dec 2010
  • France

#8

Posted 28 April 2012 - 03:50 PM

thank all.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users