- Documentation
- Server functions
- setModelHandling
Function
setModelHandling
Changes the handling of every vehicle of a model at once, for every player, including vehicles created later. A single car's changes from setVehicleHandling take priority over the model setting.
Syntax
bool setModelHandling(int model [, string property = nil, any value = nil])Arguments
modelint- Vehicle model ID.
propertystring, optional = nil- Handling field name;
nilclears all of the model's changes. valueany, optional = nil- The field's new value;
nilremoves the change for that field.
Returns
true on success, false for an unknown field.
Example
setModelHandling(596, "maxVelocity", 220)
setModelHandling(596, "engineAcceleration", 32) -- fabrycznie 25 (skala handling.cfg)
See also
getModelHandlingReturns the handling changes set for a model withsetModelHandling(without factory values).setVehicleHandlingChanges the driving parameters (handling) of one vehicle for every player: mass, top speed, acceleration, grip, brakes, steering, suspension and other handling.cfg fields. The game gets its own copy of the handling entry for this car, so other vehicles of the model do not change. You can pass one field with a value, a whole table of fields, ornilto go back to the factory handling (includingsetModelHandling). Field names; the list:getHandlingFieldNames.