setModelHandling
Server
Changes a property of a vehicle model's handling, which new vehicles of that model start with.
bool setModelHandling(string model, string property [, any value = nil])
Parameters
| Name | Type | Description |
|---|---|---|
| model | string | The vehicle model's name. |
| property | string | The property's name, as in getVehicleHandling. An unknown name raises an error. |
| value | any | The new value. nil puts the property back to the original handling. Of the property's type: a number, a boolean for ABS, a string for the names, or {x, y, z} (or a vector) for centerOfMass. A wrong type raises an error.default nil |
Returns
true if the change was made. false if the value is outside the property's limits or property is not a string.
Example
setModelHandling("infernus", "maxVelocity", 260)
setModelHandling("infernus", "driveType", "awd")Coming from MTAMTA takes a model id; here the model is given by name.
NoteVehicles that already exist do not change. To give them the model's handling, call
setVehicleHandling(vehicle).