getVehicleSirensOn | Multi Theft Auto: Wiki Skip to content

getVehicleSirensOn

Client-side
Server-side
Shared

Pair: setVehicleSirensOn

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function returns whether the sirens are turned on for the specified vehicle.

Syntax

getVehicleSirensOn ( )

Code Examples

server

This example toggles siren state when a player enters a vehicle as a driver.

function example_onVehicleEnter ( thePlayer, seat )
--If the player entered as a driver
if ( seat == 0 ) then
--If siren was off
if not getVehicleSirensOn ( source ) then
setVehicleSirensOn ( source, true ) --Turn it on
else
setVehicleSirensOn ( source, false ) --Turn it off
end
end
end
addEventHandler ( "onVehicleEnter", getRootElement(), example_onVehicleEnter )

See Also

Vehicle Functions