SetVehicleSirens: Difference between revisions
Jump to navigation
Jump to search
m (→Example) |
|||
Line 28: | Line 28: | ||
==Example== | ==Example== | ||
<section name="Server" class="server" show="true"> | |||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
addEventHandler("onVehicleEnter",root,function(player,seat) | addEventHandler("onVehicleEnter",root,function(player,seat) | ||
Line 43: | Line 44: | ||
end) | end) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | |||
==Requirements== | ==Requirements== |
Revision as of 16:32, 20 April 2012
Syntax
bool setVehicleSirens ( vehicle theVehicle, int sirenPoint, float posX, float posY, float posZ, float red, float green, float blue, [float alpha = 255, float minAlpha = 0.0] )
Required Arguments
- theVehicle: The vehicle to modify
- sirenPoint: The siren point to modify
- posX: The x position of this siren point from the center of the vehicle
- posY: The y position of this siren point from the center of the vehicle
- posZ: The z position of this siren point from the center of the vehicle
- red: The amount of red from 0 to 255
- green: The amount of green from 0 to 255
- blue: The amount of blue from 0 to 255
Optional Arguments
- alpha: The alpha of the siren from 0 to 255
- minAlpha: The minimum alpha of the light during day time
Returns
Returns true if the siren point was successfully changed on the vehicle, false otherwise.
Example
Click to collapse [-]
ServeraddEventHandler("onVehicleEnter",root,function(player,seat) if(player)and(seat==0)then vehicle = getPedOccupiedVehicle(player) addVehicleSirens(vehicle,1,1) setVehicleSirens(vehicle,1,0,0,0,100,0,100,255,122) end end) addEventHandler("onVehicleExit",root,function(player,seat) if(player)and(seat==0)then vehicle = getPedOccupiedVehicle(player) removeVehicleSirens(vehicle) end end)
Requirements
This template will be deleted.
See Also
- addVehicleUpgrade
- attachTrailerToVehicle
- blowVehicle
- createVehicle
- detachTrailerFromVehicle
- fixVehicle
- getOriginalHandling
- getTrainDirection
- getTrainPosition
- getTrainSpeed
- getTrainTrack
- getVehicleColor
- getVehicleCompatibleUpgrades
- getVehicleController
- getVehicleDoorOpenRatio
- getVehicleDoorState
- getVehicleEngineState
- getVehicleHandling
- getVehicleHeadLightColor
- getVehicleLandingGearDown
- getVehicleLightState
- getVehicleMaxPassengers
- getVehicleModelFromName
- getVehicleName
- getVehicleNameFromModel
- getVehicleOccupant
- getVehicleOccupants
- getVehicleOverrideLights
- getVehiclePaintjob
- getVehiclePanelState
- getVehiclePlateText
- getVehicleSirenParams
- getVehicleSirens
- getVehicleSirensOn
- getVehicleTowedByVehicle
- getVehicleTowingVehicle
- getVehicleTurretPosition
- getVehicleType
- getVehicleUpgradeOnSlot
- getVehicleUpgradeSlotName
- getVehicleUpgrades
- getVehicleVariant
- getVehicleWheelStates
- isTrainDerailable
- isTrainDerailed
- isVehicleBlown
- isVehicleDamageProof
- isVehicleFuelTankExplodable
- isVehicleLocked
- isVehicleOnGround
- isVehicleTaxiLightOn
- removeVehicleUpgrade
- setTrainDerailable
- setTrainDerailed
- setTrainDirection
- setTrainPosition
- setTrainSpeed
- setTrainTrack
- setVehicleColor
- setVehicleDamageProof
- setVehicleDoorOpenRatio
- setVehicleDoorState
- setVehicleDoorsUndamageable
- setVehicleEngineState
- setVehicleFuelTankExplodable
- setVehicleHandling
- setVehicleHeadLightColor
- setVehicleLandingGearDown
- setVehicleLightState
- setVehicleLocked
- setVehicleOverrideLights
- setVehiclePaintjob
- setVehiclePanelState
- setVehiclePlateText
- setVehicleSirens
- setVehicleSirensOn
- setVehicleTaxiLightOn
- setVehicleTurretPosition
- setVehicleVariant
- setVehicleWheelStates