[Release] Sirencontrols : JS & Optimized

Hello everyone, I’m releasing another version of Scammer’s script sirencontrols, in JS.

This version provides the “silent feature” and the bleping sound. The alternate siren sound is desactivated (commented in the script) due to the need of a loop with all players each ticks.

It is obviously, a standalone resource.

Commands

  • Hold G to bleep the siren.
  • Press G to mute the siren.

Download on Github

Credits: Scammer the snail

11 Likes

Hi, Thanks for the share pichotM

thx for the share! but how come there is no server sided code ?

Because it doesn’t need any server sided code

so if you put siren on, and someone is connecting after you did put on your sirens he will hear the same sirens a you do er even hear the sirens?

The script uses DECOR so yes

Updated to support onesync

Thanks for your share, maybe we use that for PacificBay. <3

The script does not work properly with OneSync, the driver sees the difference between CODE 2 (lights without sound) and CODE 3 (lights with sound), but people around them still hear the vehicle in CODE 3 (Problem of synchronization).

Look into the JS.

checkForSilentSirens() {
		for (let index = 0; index < 64; index++) {
			if (NetworkIsPlayerActive(index)) {
				const playerVeh = GetVehiclePedIsUsing(GetPlayerPed(index));
				if (playerVeh) {

Try chaning that to

checkForSilentSirens() {
		for (let index = 0; index < 255; index++) {
			if (NetworkIsPlayerActive(index)) {
				const playerVeh = GetVehiclePedIsUsing(GetPlayerPed(index));
				if (playerVeh) {

Not sure at all if it will work / fix it ( it look pretty much the same as an normal lua code )