GetVehicleHeadLightColor
From Multi Theft Auto: Wiki
This function will get the headlight color of a vehicle.
Syntax
int, int, int getVehicleHeadLightColor ( vehicle theVehicle )
OOP Syntax Help! I don't understand this!
- Method: vehicle:getHeadLightColor(...)
- Counterpart: setVehicleHeadLightColor
Required Arguments
- theVehicle: The vehicle that you wish to set the headlight color of.
Returns
Returns three integers for the red, green and blue of the headlight color for the specified vehicle, false if an invalid vehicle was specified.
Example
This example outputs the player vehicle head lights color.
Click to collapse [-]
Clientfunction getHeadLightsColor() local vehicle = getPedOccupiedVehicle(localPlayer) -- We get the player vehicle.. if (vehicle) then -- We check if he's on a vehicle... local r, g, b = getVehicleHeadLightColor(vehicle) -- We get the vehicle head lights color.. outputChatBox("Your vehicle lights color are: ".. r ..", ".. g ..", ".. b) -- We output them to the chatbox. end end addCommandHandler("lightscolor",getHeadLightsColor) -- Add the command handler attached to the function "getHeadLightsColor".
Click to collapse [-]
Serverfunction getHeadLightsColor(thePlayer) local vehicle = getPedOccupiedVehicle(thePlayer) -- We get the player vehicle.. if (vehicle) then -- We check if he's on a vehicle... local r, g, b = getVehicleHeadLightColor(vehicle) -- We get the vehicle head lights color.. outputChatBox("Your vehicle lights color are: ".. r ..", ".. g ..", ".. b, thePlayer) -- We output them to the chatbox. end end addCommandHandler("lightscolor",getHeadLightsColor) -- Add the command handler attached to the function "getHeadLightsColor".
See Also
FROM VERSION 1.5.7 r19626 ONWARDS
- attachTrailerToVehicle
- blowVehicle
- createVehicle
- detachTrailerFromVehicle
- fixVehicle
- getModelHandling
- getOriginalHandling
- getTrainDirection
- getTrainPosition
- getTrainSpeed
FROM VERSION 1.6 r7485 ONWARDS
- getVehicleColor
- getVehicleCompatibleUpgrades
- getVehicleController
- getVehicleDoorOpenRatio
- getVehicleDoorState
- getVehicleEngineState
- getVehicleHandling
- getVehicleHeadLightColor
- getVehicleLandingGearDown
- getVehicleLightState
- getVehicleMaxPassengers
- getVehicleModelFromName
- getVehicleName
- getVehicleNameFromModel
- getVehicleOccupant
- getVehicleOccupants
- getVehicleOverrideLights
- getVehiclePaintjob
- getVehiclePanelState
- getVehiclePlateText
- getVehicleRespawnPosition
- getVehicleRespawnRotation
- getVehicleSirenParams
- getVehicleSirens
- getVehicleSirensOn
- getVehicleTowedByVehicle
- getVehicleTowingVehicle
- getVehicleTurretPosition
- getVehicleType
- getVehicleUpgradeOnSlot
- getVehicleUpgradeSlotName
- getVehicleUpgrades
- getVehicleVariant
- getVehicleWheelStates
- getVehiclesOfType
- isTrainDerailable
- isTrainDerailed
- isVehicleBlown
- isVehicleDamageProof
- isVehicleFuelTankExplodable
- isVehicleLocked
- isVehicleOnGround
- isVehicleTaxiLightOn
- removeVehicleSirens
- removeVehicleUpgrade
- resetVehicleExplosionTime
- resetVehicleIdleTime
- respawnVehicle
- setModelHandling
- setTrainDerailable
- setTrainDerailed
- setTrainDirection
- setTrainPosition
- setTrainSpeed
FROM VERSION 1.6 r7485 ONWARDS
- setVehicleColor
- setVehicleDamageProof
- setVehicleDoorOpenRatio
- setVehicleDoorState
- setVehicleDoorsUndamageable
- setVehicleEngineState
- setVehicleFuelTankExplodable
- setVehicleHandling
- setVehicleHeadLightColor
- setVehicleIdleRespawnDelay
- setVehicleLandingGearDown
- setVehicleLightState
- setVehicleLocked
- setVehicleOverrideLights
- setVehiclePaintjob
- setVehiclePanelState
- setVehiclePlateText
- setVehicleRespawnDelay
- setVehicleRespawnPosition
- setVehicleRespawnRotation
- setVehicleSirens
- setVehicleSirensOn
- setVehicleTaxiLightOn
- setVehicleTurretPosition