Scripting/Server/Classes/Vehicle/SetHandlingData
Per-vehicle handling override. id 0-55: the HANDLING_* constants (0-26) such as HANDLING_MASS, HANDLING_MAXVELOCITY, HANDLING_TRACTIONMULTIPLIER. GetHandlingData returns 0 for a value you never set.
Syntax
vehicle.SetHandlingData(id, value)vehicle.GetHandlingData(id)Arguments
- int id –
id0-55: theHANDLING_*constants (0-26) such asHANDLING_MASS,HANDLING_MAXVELOCITY,HANDLING_TRACTIONMULTIPLIER. - bool value
Example
function onPlayerCommand( player, cmd, params )
{
if ( cmd == "sethandlingdata" )
{
local veh = player.Vehicle;
if ( !veh ) return MessagePlayer( "Sit in a vehicle first.", player );
veh.SetHandlingData( 0, true );
}
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
- vehicle.Remove
- vehicle.Respawn
- vehicle.Fix
- vehicle.Explode
- vehicle.SetBurstableTyres
- player.AttachTo
- object.AttachTo
- object.AttachToBone
- vehicle.SetComponentStatus
- vehicle.SetComponentStatus
- vehicle.SetComponentAngle
- vehicle.SetComponentColour
Section: Vehicle
Categories: Server methods | Vehicle