SetVehicleModelExhaustFumesPosition: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 19: Line 19:
==Example==  
==Example==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
local vehicle = createVehicle(411,0,0,3)
local vehicle = createVehicle(411,0,0,3) --Create a vehicle
local x,y,z = getVehicleModelExhaustFumesPosition(vehicle)
local x,y,z = getVehicleModelExhaustFumesPosition(vehicle) -- Get its exhaust fumes position
setVehicleModelExhaustFumesPosition(vehicle,x,y,z+1)
setVehicleModelExhaustFumesPosition(vehicle,x,y,z+1) -- Set its exhaust fumes position
</syntaxhighlight>
</syntaxhighlight>


==See Also==
==See Also==
{{Vehicle_functions}}
{{Vehicle_functions}}

Revision as of 02:37, 7 October 2017

This function sets the position of the exhaust fumes the vehicle model emits. Use setVehicleComponentPosition to adjust the exhaust position.

Syntax

bool setVehicleModelExhaustFumesPosition(int modelID, float posX, float posY, float posZ)

Parameters

  • modelID: The model ID which you want to apply the change to
  • posX, posY, posZ: The desired position

Returns

Returns true if everything went fine, false otherwise.

Example

local vehicle = createVehicle(411,0,0,3) --Create a vehicle
local x,y,z = getVehicleModelExhaustFumesPosition(vehicle) -- Get its exhaust fumes position
setVehicleModelExhaustFumesPosition(vehicle,x,y,z+1) -- Set its exhaust fumes position

See Also