Vehicle::setBurnout: Difference between revisions

From RAGE Multiplayer Wiki
 
(One intermediate revision by the same user not shown)
Line 8: Line 8:
*'''Undefined'''
*'''Undefined'''
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript" highlight='6'>
// todo
mp.events.add('breaktyres', (vehicle) => { //Event when called defaltes the 4 tyres of the vehicle and Set the vehicle out of control for 2 seconds.
    vehicle.setTyreBurst(0, false, 1000);
    vehicle.setTyreBurst(1, false, 1000);
    vehicle.setTyreBurst(4, false, 1000);
    vehicle.setTyreBurst(5, false, 1000);
    vehicle.setBurnout(true);
    setTimeout(_ => {
        vehicle.setBurnout(false);
    }, 2000)
})
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Vehicle_function_c}}
{{Vehicle_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Latest revision as of 10:44, 7 December 2017

On accelerating, spins the driven wheels with the others braked, so you don't go anywhere.

Syntax

vehicle.setBurnout(toggle);

Required Arguments

  • toggle: Boolean

Return value

  • Undefined

Example

mp.events.add('breaktyres', (vehicle) => { //Event when called defaltes the 4 tyres of the vehicle and Set the vehicle out of control for 2 seconds.
    vehicle.setTyreBurst(0, false, 1000);
    vehicle.setTyreBurst(1, false, 1000);
    vehicle.setTyreBurst(4, false, 1000);
    vehicle.setTyreBurst(5, false, 1000);
    vehicle.setBurnout(true);
    setTimeout(_ => {
        vehicle.setBurnout(false);
    }, 2000)
})

See also