Hello !
Here’s a little sharing, which is able to enable you to create a megaphone for the police :slight_smile:
Default key (proper shift)

Preview: Make the player character speak (npc quotes) – #7 by F.Schrader

Citizen.CreateThread(operate()
    whereas true do
        timer = 1000
        native playerPed = PlayerPedId()
        if IsPedInAnyPoliceVehicle(playerPed) then
            timer = 0
            if IsControlJustPressed(0, 21) then
                native Pores and skin= GetHashKey("mp_m_freemode_01")
                native playerVeh = GetVehiclePedIsIn(playerPed, false)
                native playerPosition = GetEntityCoords(playerPed)
                Citizen.Wait(10)
                RequestModel(Pores and skin)
                whereas(not HasModelLoaded(Pores and skin)) do
                    Citizen.Wait(10)
                finish
                    Megaphone = CreatePed(26, Pores and skin, playerPosition.x, playerPosition.y, playerPosition.z, 1, false, true)
                    SetEntityInvincible(Megaphone, true)
                    SetEntityVisible(Megaphone, false)
                    SetEntityCollision(Megaphone, false, false)
                    SetEntityCompletelyDisableCollision(Megaphone, true, true)
                    AttachEntityToEntity(Megaphone, playerVeh, 0, 0.27, 0.0, 0.0, 0.5, 0.5, 180, false, false, false, false, 2, false)
                    PlayPedAmbientSpeechWithVoiceNative(Megaphone, "NO_LOITERING_MEGAPHONE", "S_M_Y_COP_01_WHITE_FULL_01", "SPEECH_PARAMS_FORCE_SHOUTED", 6)
                    
                    --[[
                        "STOP_VEHICLE_CAR_MEGAPHONE"
                        "STOP_VEHICLE_BOAT_MEGAPHONE"

                        "CLEAR_AREA_PANIC_MEGAPHONE"
                        "CLEAR_AREA_MEGAPHONE"

                        "NO_LOITERING_MEGAPHONE"
                        "STOP_ON_FOOT_MEGAPHONE"
                        "STOP_ON_FOOT_CHOPPER_MEGAPHONE"
                        "STOP_VEHICLE_CAR_WARNING_MEGAPHONE"
                        "STOP_VEHICLE_GENERIC_MEGAPHONE"
                        "STOP_VEHICLE_GENERIC_WARNING_MEGAPHONE"
                        "COP_ARRIVAL_ANNOUNCE_MEGAPHONE"
                        "SHOT_AT_HELI_MEGAPHONE"
                        "SHOT_TYRE_CHOPPER_MEGAPHONE"
                        "LOST_SUSPECT_CHOPPER_MEGAPHONE"
                        "SPOT_SUSPECT_CHOPPER_MEGAPHONE"
                    ]]
                    

                    Wait(5000)
                    DeleteEntity(Megaphone)
            finish
        finish
        Citizen.Wait(timer)
    finish
finish)



Looking for paid scripts? Click here