M MY Multiplayer: Wiki
Side
Kind

getVehicleEngineSound

Client

Returns the engine and induction sounds setVehicleEngineSound put on a vehicle.

string|false getVehicleEngineSound(vehicle vehicle)

Parameters

NameTypeDescription
vehiclevehicleThe vehicle.

Returns

Two values: the engine sound's name and the induction sound's name, each false when it was not replaced. A single false if the element is not a vehicle on this client.

Example

local vehicle = getPedOccupiedVehicle(localPlayer)
if vehicle then
    local engine, induction = getVehicleEngineSound(vehicle)
    outputDebugString(tostring(engine) .. " / " .. tostring(induction))
end

See also