Difference between revisions of "00A5"

From GTAMods Wiki
Jump to navigation Jump to search
 
Line 1: Line 1:
 
<code>00A5=5,%1o% %2d% %3d% %4d% %5d%</code><br>
 
<code>00A5=5,%1o% %2d% %3d% %4d% %5d%</code><br>
 
'''Description''': Creates a vehicle at a coordinate<br>
 
'''Description''': Creates a vehicle at a coordinate<br>
'''Parameter 1''': [[DFF]] model name or ID<br>
+
'''Parameter 1''': Valid vehicle [[DFF]] model name or ID number as defined in the [[IDE#CARS|IDE]] file<br>
 
'''Parameter 2''': X-coordinate<br>
 
'''Parameter 2''': X-coordinate<br>
 
'''Parameter 3''': Y-coordinate<br>
 
'''Parameter 3''': Y-coordinate<br>
Line 8: Line 8:
 
'''Supports''': GTA3, Vice City, San Andreas<br>
 
'''Supports''': GTA3, Vice City, San Andreas<br>
  
This creates a vehicle at a coordinate. Using this opcode requires [[0247]] or else the game would crash.
+
This creates a vehicle at a coordinate. Using this opcode requires [[0247]] or else the game could crash.
  
 
==Note==
 
==Note==
 
Sometimes this opcode is written as this:<br>
 
Sometimes this opcode is written as this:<br>
 
<code>00A5=5,%5d% %1o% %2d% %3d% %4d%</code><br>
 
<code>00A5=5,%5d% %1o% %2d% %3d% %4d%</code><br>
The fifth parameter is placed in the beginning instead of at the end. This depends on which sascm.ini file you use.<br>
+
The fifth parameter is placed in the beginning instead of at the end. This depends on which INI file you use.<br>
[[Mission_Scripting_%28Overview%29#Sanny_Builder|Sanny Builder]] by default:
+
[[Sanny_Builder|Sanny Builder]] by default:
 
<code>00A5: 0@ = create_car #PONY at 0.0 0.0 0.0</code>
 
<code>00A5: 0@ = create_car #PONY at 0.0 0.0 0.0</code>
  
 
==Example==
 
==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 word for word. There are other ways of doing this. The following code uses the Sanny Builder.
+
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.
  
 
<code>:LoadModel<br></code>
 
<code>:LoadModel<br></code>
Line 33: Line 33:
  
 
==Keywords==
 
==Keywords==
create, vehicle, model
+
create, vehicle, model, car
  
 
[[Category:OpCodes]]
 
[[Category:OpCodes]]

Revision as of 00:36, 7 November 2008

00A5=5,%1o% %2d% %3d% %4d% %5d%
Description: Creates a vehicle at a coordinate
Parameter 1: Valid vehicle DFF model name or ID number as defined in the IDE file
Parameter 2: X-coordinate
Parameter 3: Y-coordinate
Parameter 4: Z-coordinate
Parameter 5: Vehicle handle
Supports: GTA3, Vice City, San Andreas

This creates a vehicle at a coordinate. Using this opcode requires 0247 or else the game could 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, vehicle, model, car