if isKeyJustPressed(VK_X) and not sampIsChatInputActive() and not isSampfuncsConsoleActive() then
if isCharInAnyCar(PLAYER_PED) and getDriverOfCar(storeCarCharIsInNoSave(PLAYER_PED)) == PLAYER_PED then
if isCarSirenOn(storeCarCharIsInNoSave(PLAYER_PED)) then
switchCarSiren(storeCarCharIsInNoSave(PLAYER_PED), false)
setAudioStreamState(SirenUntoggleS, ev.PLAY)
else
xz = false
setAudioStreamState(SirenToggleS, ev.PLAY)
wait(300)
switchCarSiren(storeCarCharIsInNoSave(PLAYER_PED), true)
end
end
end
if isKeyJustPressed(VK_U) and not sampIsChatInputActive() and not isSampfuncsConsoleActive() then
if isCharInAnyCar(PLAYER_PED) and getDriverOfCar(storeCarCharIsInNoSave(PLAYER_PED)) == PLAYER_PED then
if isCarSirenOn(storeCarCharIsInNoSave(PLAYER_PED)) then
setAudioStreamState(SirenUntoggleS, ev.PLAY)
wait(300)
while true do
if isKeyJustPressed(VK_U) and not sampIsChatInputActive() and not isSampfuncsConsoleActive() then
setAudioStreamState(SirenUntoggleS, ev.PLAY)
wait(600)
xz = not xz
break
else
xz = true
if xz then
function sampev.onSendVehicleSync(data)
if data.siren == 1 and xz then
data.keysData = 2
end
return data
end
end
altSirenToggle()
end
end
end
end
end
function altSirenToggle()
wait(0)
mem.setfloat(CVehicle + 0x514, 1)
end