|
 |
|
|
|
|
|
GTA Modification Forums
[SA] reduce the maximum number of munitions .
 |
|
 |
| |
The_Sorrow  |
Posted: Thursday, Apr 19 2012, 12:02
|
Heaven, I'm in heaven(8)

Group: Members
Joined: May 31, 2010


|
| 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!
This post has been edited by The_Sorrow on Thursday, Apr 19 2012, 12:06
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
| |
 |
|
 |
|
|
|
|