[STANDALONE] [FREE] [RELEASE] Automated LEO Sirens and Locking

This post has been discontinued.

9 Likes

Does this work for every siren script or a specific one?

This should work for every siren script! If it doesn’t, feel free to inform us here and we can have it immediatly updated or fixed!

Works good, just gonna say it again, everyone may need to edit the locking function to what qb-vehiclekeys uses or you won’t be able to unlock the vehicle after getting out. You can also just grab the whole code in client.lua from this resource and place it into qb-smallresources client/whatever.lua file you chose.

Maybe provide an edit for the OP that they can include in their resource so it can work out of the box for QB users :wink:

This is set to work with default qb-vehiclekeys

Lick Me
-- Siren & Lock Doors (Police) --

CreateThread(function()

    while true do

    playerped = PlayerPedId()

    person_owns_vehicle = IsPedTryingToEnterALockedVehicle(playerPed)

    player_is_emerg_driver = false

    player_is_own_vehicle = false

    veh = GetVehiclePedIsUsing(playerped)

    if IsVehicleSirenOn(veh) and IsPedInAnyVehicle(playerped, true) and IsControlPressed(0, 49) then

        player_is_emerg_driver = true

        SetVehicleSiren(veh, false)

        Wait(1)

        --SetPlayersLastVehicle(veh)

        SetVehicleSiren(veh, true)

        player_is_emerg_driver = false

        player_is_own_vehicle = true

    end

    if player_is_own_vehicle then

        -- SetVehicleDoorsLockedForAllPlayers(veh, true)

        SetVehicleDoorsLocked(veh, 2)

        QBCore.Functions.Notify("Vehicle locked!", "primary")                    

        player_is_own_vehicle = false

        -- More to be added here, newer version soon.

        end

    Wait(0)

    end

end)
1 Like

would this replace the WM-Server sirens on and Luxart Control ?

This doesn’t replace the actual script. It’s an addon script that just makes it so if you step out of the vehicle, it turns off the sirens automatically for you. If this doesn’t answer your question, feel free to elaborate more and I can try my best to answer :slight_smile:

1 Like

Resmon?

I’m not actually sure. If anyone can check this for me, would be great. If not, you would have to check for yourself within the server.

Will there be updates to this script in the future?

Yup, if we ever see something needing to be updated. We will!

Alright, thank you for your support.

We will always be able to offer support. We possibly could add that feature in the future. Currently we are working on our next script!

thanks i added it and its working.

Would you guys know how to chnage the horn sounds?

Can you explain? I"m not sure if I’m getting your question. If you actually do mean horn sounds, that’s classic GTA. Just use VMenu and modify your car or any other menu to do so.

I love the idea of this, with the locking you should make it so once you get back within a certain configurable radius of the vehicle it will automatically unlock!

1 Like

We will attempt to have this done in the version 2 of this script!

1 Like

Just a little update for everyone that was wondering. We should have an update for this script coming up somewhere around this month!

Do you know an exact date of when this script updates?