SetVehicleSmokeTrailEnabled: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
}}
}}


[[File:Mta-screen 2024-12-26 17-38-53.png|thumb|right]]
{{Note|The smoke trail is only supported to models 512 and 513, so this only going to works with that models}}
 
[[File:Mta-screen 2024-12-26 17-38-53.png|thumb|right|The red smoke trail from a Stuntplane]]
==Syntax==  
==Syntax==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
Line 14: Line 16:
*'''theVehicle:''' The [[vehicle]] that you want to set the smoke trail.
*'''theVehicle:''' The [[vehicle]] that you want to set the smoke trail.
*'''enable:''' A boolean if set to true it will enabled the smoke trail.
*'''enable:''' A boolean if set to true it will enabled the smoke trail.
*'''note''' this only works with vehicle models numbers 512 and 513.


===Returns===
===Returns===

Latest revision as of 14:50, 26 December 2024

BETA: NEW FEATURE (BUILD: 1.6.0 r22815 )

This function used to set planes smoke trail enabled or disabled.

[[{{{image}}}|link=|]] Note: The smoke trail is only supported to models 512 and 513, so this only going to works with that models
The red smoke trail from a Stuntplane

Syntax

setVehicleSmokeTrailEnabled ( vehicle veh, bool enable )

Required arguments

  • theVehicle: The vehicle that you want to set the smoke trail.
  • enable: A boolean if set to true it will enabled the smoke trail.

Returns

If successful returns true, false otherwise.

Example

This example let you set the smoke trail.

local veh = {512,513} 

local plane = createVehicle (veh[2], 2043.23499, 1537.88562, 10.67188)

local ped = createPed ( 2, 0,0,0 )

warpPedIntoVehicle ( ped, plane)   

setTimer(function()
    print(setVehicleSmokeTrailEnabled (plane,true))
end ,1500,1)
 
function disbled()
    print(setVehicleSmokeTrailEnabled (plane,false))
    print(isVehicleSmokeTrailEnabled(plane))
end
 
bindKey ("r", "down", disbled ) 

See Also