Difference between revisions of "00A5"

From GTAMods Wiki
Jump to navigation Jump to search
m
m
Line 1: Line 1:
<code>00A5=5,%1o% %2d% %3d% %4d% %5d%</code><br>
+
{{OpCode
'''Description''': Creates a vehicle at a coordinate<br>
+
| ini        = 00A5=5,%1o% %2d% %3d% %4d% %5d%
'''Parameter 1''': Valid vehicle [[DFF]] model name or ID number as defined in the [[IDE#CARS|IDE]] file<br>
+
| description = Creates a vehicle at a coordinate
'''Parameter 2''': X-coordinate<br>
+
| p1          = Valid vehicle [[DFF]] model name or ID number as defined in the [[IDE#CARS|IDE]] file
'''Parameter 3''': Y-coordinate<br>
+
| p2          = X-coordinate
'''Parameter 4''': Z-coordinate<br>
+
| p3          = Y-coordinate
'''Parameter 5''': Vehicle handle<br>
+
| p4          = Z-coordinate
'''Supports''': GTA3, Vice City, San Andreas<br>
+
| p5          = Vehicle handle
'''Analogous to GTA4''': [[CREATE_CAR]]
+
| game        = GTA3, Vice City, San Andreas
 
+
| native      = [[CREATE_CAR]]
 +
}}
 
This creates a vehicle at a coordinate. Using this opcode requires [[0247]] or else the game might crash.
 
This creates a vehicle at a coordinate. Using this opcode requires [[0247]] or else the game might crash.
  

Revision as of 19:52, 27 December 2008

{{{games}}}


Description
Creates a vehicle at a coordinate
Syntax
{{{syntax1}}}
Parameter
Native analog
CREATE_CAR

This creates a vehicle at a coordinate. Using this opcode requires 0247 or else the game might crash.

Note

Sometimes this opcode is written as this:
00A5=5,%5d% %1o% %2d% %3d% %4d%
The fifth parameter is placed in the beginning instead of at the end. This depends on which INI file you use.
Sanny Builder by default: 00A5: 0@ = create_car #PONY at 0.0 0.0 0.0

Example

Beginners have a hard time creating vehicles because it is tough to learn how to make a code that would create a vehicle successfully. This will be only shown as an example and shouldn't be copied verbatim. There are other ways of doing this. The following code uses the Sanny Builder.

 :LoadModel
 0247: load_model #PONY
 
 :CheckModel
 0001: wait 0 ms
 00D6: if 0
 0248:   model #PONY available
 004D: jump_if_false @CheckModel
 00A5: 0@ = create_car #PONY at 0.0 0.0 0.0
 0249: release_model #PONY
 004E: end_thread

Keywords

create, spawn, car, vehicle, model