Vehicle::isSirenOn

From RAGE Multiplayer Wiki
Jump to navigation Jump to search

Return true if siren (or flashlights) are enabled, false if not

Syntax

vehicle.isSirenOn();

Required Arguments

Return value

  • Boolean

Example

var MyCarSiren = false

setInterval(() => {
    if(mp.players.local.vehicle.isSirenOn() != MyCarSiren){
        MyCarSiren = mp.players.local.vehicle.isSirenOn()

        // Here you can do an action when user toggle ON/OFF sirens

        // You can use this to sync siren between users

    }
}, 1000)

See also