Garry's Mod Wiki

Vehicle:SetVehicleParams

Vehicle:SetVehicleParams

Vehicle:SetVehicleParams( table params )

Description

Sets the vehicle parameters for given vehicle.

Not all variables from the Structures/VehicleParams can be set.

Arguments

1 table params
The new new vehicle parameters. See Structures/VehicleParams.

Example

Adds 25 horsepower to every vehicle spawned.

hook.Add("PlayerSpawnedVehicle", "VehicleParamsExample", function(ply, entity) local params = entity:GetVehicleParams() params.engine.horsepower = params.engine.horsepower + 25 entity:SetVehicleParams(params) end)

Special Pages


Wikis

?

Render Time: 147ms

DB GetPage 42
Generate Html 4
SaveChanges (1) 89
Render Body 0
Render Sidebar 10