SetVehicleDummyPosition: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
{{Client function}}
{{Client function}}
__NOTOC__
__NOTOC__
{{New feature/item|3.0159|1.5.8|20797|
{{Added feature/item|3.0159|1.5.9|1.5.8|20797|This function sets the position of the dummy for the given [[vehicle]].}}
This function sets the position of the dummy for the given vehicle.}}


==Syntax==
==Syntax==
Line 11: Line 10:


===Required Arguments===  
===Required Arguments===  
*'''theVehicle:''' The [[vehicle]] you want to set the dummy position for
*'''theVehicle:''' The [[vehicle]] you want to set the dummy position for.
*'''dummy:''' The dummy whose position you want to set
*'''dummy:''' The dummy whose position you want to set.
*'''x''', '''y''', '''z''' The new dummy position
*'''x''', '''y''', '''z''' The new dummy position.


==Allowed dummies==
===Allowed Dummies===
{{VehicleDummies}}
{{VehicleDummies}}


===Returns===
===Returns===
Returns ''true'' for success, ''false'' otherwise.
Returns ''true'' if the dummy position has been successfully set, ''false'' otherwise.


==Example==
==Example==
Line 25: Line 24:


==Requirements==
==Requirements==
{{Requirements||1.5.8-9.20797|}}
{{Requirements|n/a|1.5.8-9.20797|}}


==See Also==
==See Also==
{{Client vehicle functions}}
{{Client vehicle functions}}

Revision as of 10:13, 20 September 2021

20797

Syntax

bool setVehicleDummyPosition ( vehicle theVehicle, string dummy, float x, float y, float z )

OOP Syntax Help! I don't understand this!

Method: vehicle:setDummyPosition(...)
Counterpart: getVehicleDummyPosition


Required Arguments

  • theVehicle: The vehicle you want to set the dummy position for.
  • dummy: The dummy whose position you want to set.
  • x, y, z The new dummy position.

Allowed Dummies

  • light_front_main: Primary front lights position.
  • light_rear_main: Primary rear lights position.
  • light_front_second: Secondary front lights position.
  • light_rear_second: Secondary rear lights position.
  • seat_front: Front seat position.
  • seat_rear: Rear seat position.
  • exhaust: Exhaust fumes start position.
  • engine: Engine smoke start position.
  • gas_cap: Vehicle gas cap position (shooting it will explode vehicle).
  • trailer_attach: Point at which trailers will be attached to vehicle.
  • hand_rest: Point at which the steer of a bike is held.
  • exhaust_second: Secondary exhaust position (for example in NRG-500)
  • wing_airtrail: Point from which air trail will show in airplanes, visible while in sharp turns.
  • veh_gun: Vehicle gun position (ex. Rustler).

Returns

Returns true if the dummy position has been successfully set, false otherwise.

Example

Accessories-text-editor.png Script Example Missing Function SetVehicleDummyPosition needs a script example, help out by writing one.

Before submitting check out Editing Guidelines Script Examples.


Requirements

Minimum server version n/a
Minimum client version 1.5.8-9.20797

Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version client="1.5.8-9.20797" />

See Also