Vehicle::createScriptVehicleGenerator: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
(yay)
 
Line 1: Line 1:
Creates a script vehicle generator at the given coordinates. Most parameters after the model hash are unknown.<br><br>Parameters:<br>x/y/z - Generator position<br>heading - Generator heading<br>p4 - Unknown (always 5.0)<br>p5 - Unknown (always 3.0)<br>modelHash - Vehicle model hash<br>p7/8/9/10 - Unknown (always -1)<br>p11 - Unknown (usually TRUE, only one instance of FALSE)<br>p12/13 - Unknown (always FALSE)<br>p14 - Unknown (usally FALSE, only two instances of TRUE)<br>p15 - Unknown (always TRUE)<br>p16 - Unknown (always -1)<br><br>Vector3 coords = GET_ENTITY_COORDS(PLAYER_PED_ID(), 0); CREATE_SCRIPT_VEHICLE_GENERATOR(coords.x, coords.y, coords.z, 1.0f, 5.0f, 3.0f, GET_HASH_KEY('adder'), -1. -1, -1, -1, -1, true, false, false, false, true, -1);
Creates a script vehicle generator at the given coordinates. Most parameters after the model hash are unknown.<br><br>Parameters:<br>x/y/z - Generator position<br>heading - Generator heading<br>p4 - Unknown (always 5.0)<br>p5 - Unknown (always 3.0)<br>modelHash - Vehicle model hash<br>p7/8/9/10 - Unknown (always -1)<br>p11 - Unknown (usually TRUE, only one instance of FALSE)<br>p12/13 - Unknown (always FALSE)<br>p14 - Unknown (usally FALSE, only two instances of TRUE)<br>p15 - Unknown (always TRUE)<br>p16 - Unknown (always -1)<br><br>Vector3 coords = GET_ENTITY_COORDS(PLAYER_PED_ID(), 0); CREATE_SCRIPT_VEHICLE_GENERATOR(coords.x, coords.y, coords.z, 1.0f, 5.0f, 3.0f, GET_HASH_KEY('adder'), -1. -1, -1, -1, -1, true, false, false, false, true, -1);
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">vehicle.createScriptVehicleGenerator(x, y, z, heading, p4, p5, modelHash, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16);</syntaxhighlight>
<syntaxhighlight lang="javascript">mp.game.vehicle.createScriptVehicleGenerator(x, y, z, heading, p4, p5, modelHash, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16);</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
*'''x:''' float
*'''x:''' float
Line 24: Line 24:
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
todo
// todo
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Vehicle_function_c}}
{{Vehicle_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Latest revision as of 21:34, 6 May 2017

Creates a script vehicle generator at the given coordinates. Most parameters after the model hash are unknown.

Parameters:
x/y/z - Generator position
heading - Generator heading
p4 - Unknown (always 5.0)
p5 - Unknown (always 3.0)
modelHash - Vehicle model hash
p7/8/9/10 - Unknown (always -1)
p11 - Unknown (usually TRUE, only one instance of FALSE)
p12/13 - Unknown (always FALSE)
p14 - Unknown (usally FALSE, only two instances of TRUE)
p15 - Unknown (always TRUE)
p16 - Unknown (always -1)

Vector3 coords = GET_ENTITY_COORDS(PLAYER_PED_ID(), 0); CREATE_SCRIPT_VEHICLE_GENERATOR(coords.x, coords.y, coords.z, 1.0f, 5.0f, 3.0f, GET_HASH_KEY('adder'), -1. -1, -1, -1, -1, true, false, false, false, true, -1);

Syntax

mp.game.vehicle.createScriptVehicleGenerator(x, y, z, heading, p4, p5, modelHash, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16);

Required Arguments

  • x: float
  • y: float
  • z: float
  • heading: float
  • p4: float
  • p5: float
  • modelHash: Model hash or name
  • p7: int
  • p8: int
  • p9: int
  • p10: int
  • p11: Boolean
  • p12: Boolean
  • p13: Boolean
  • p14: Boolean
  • p15: Boolean
  • p16: int

Return value

  • int

Example

// todo

See also