Making player not able to talk when dead

Hey guys, I was wondering if any of you know a script on here that will prevent people from talking when they die?

Thanks :slight_smile:

maybe something like this could work?

Citizen.CreateThread(function()
    while true do
        Citizen.Wait(0)
        if IsPlayerDead(PlayerId()) then
            DisableControlAction(0, 249, true) -- 249 = INPUT_PUSH_TO_TALK (n)
        end
    end
end)

Disables the push to talk button when the player is dead.

1 Like

@Vespura Where would i put that?