Enable mouse rotation while player is dead

Hello,

My goal is to enable mouse rotation control while player is dead.
I tried to call EnableControlAction(int padIndex, uint control, bool enable) but still not working.

Any ideas?

public async Task OnPlayerDead()
        {
            await Delay(0);
            if (Function.Call<bool>((Hash)0x2E9C3FCB6798F397, API.PlayerId()))
            {

                if (!setDead)
                {
                    TriggerServerEvent("vorp:ImDead", true);
                    setDead = true;
                }
                API.NetworkSetInSpectatorMode(true, API.PlayerPedId());
                //API.AnimpostfxPlay("DeathFailMP01"); 

                Function.Call((Hash)0x351220255D64C155, 0, 0x84574AE8, true); 
                Function.Call((Hash)0x351220255D64C155, 0, 0x8ED92E16, true);
                Function.Call((Hash)0x351220255D64C155, 0, 0xBA60039F, true);
                Function.Call((Hash)0x351220255D64C155, 0, 0xD2047988, true);
                Function.Call((Hash)0x351220255D64C155, 0, 0xE4130778, true);
                Function.Call((Hash)0x351220255D64C155, 0, 0xBFF476F9, true);
                Function.Call((Hash)0x351220255D64C155, 0, 0x482560EE, true);
                Function.Call((Hash)0x351220255D64C155, 0, 0x4AA1560E, true);
                Function.Call((Hash)0x351220255D64C155, 0, 0x390948DC, true);
                Function.Call((Hash)0x351220255D64C155, 0, 0x6BC904FC, true);
                Function.Call((Hash)0x351220255D64C155, 0, 0xA1EB1353, true);
                Function.Call((Hash)0x351220255D64C155, 0, 0xA987235F, true);
                Function.Call((Hash)0x351220255D64C155, 0, 0xD6C4ECDC, true);
                Function.Call((Hash)0x351220255D64C155, 0, 0x3D99EEC6, true);
                Function.Call((Hash)0x351220255D64C155, 0, 0xB6F3E4FE, true);
                Function.Call((Hash)0x351220255D64C155, 0, 0x2CAF327E, true);
                Function.Call((Hash)0x351220255D64C155, 0, 0x39CCABD5, true);
                Function.Call((Hash)0x351220255D64C155, 0, 0x6C9810A5, true);


                Function.Call((Hash)0xD63FE3AF9FB3D53F, false);     
                Function.Call((Hash)0x1B3DA717B9AFF828, false);
                TimeToRespawn = Utils.GetConfig.Config["RespawnTime"].ToObject<int>();

                while (TimeToRespawn >= 0 && setDead)
                {
                    await Delay(1000);
                    TimeToRespawn -= 1;
                    Exports["spawnmanager"].setAutoSpawn(false);
                }
                string keyPress = Utils.GetConfig.Config["RespawnKey"].ToString();
                int KeyInt = Convert.ToInt32(keyPress, 16);
                bool pressKey = false;
                while (!pressKey && setDead)
                {
                    await Delay(0);
                    if (!Function.Call<bool>((Hash)0xC841153DED2CA89A, API.PlayerPedId()))
                    {
                        API.NetworkSetInSpectatorMode(true, API.PlayerPedId());
                        await Utils.Miscellanea.DrawText(Utils.GetConfig.Langs["SubTitlePressKey"], Utils.GetConfig.Config["RespawnSubTitleFont"].ToObject<int>(), 0.50f, 0.50f, 1.0f, 1.0f, 255, 255, 255, 255, true, true);
                        if (Function.Call<bool>((Hash)0x580417101DDB492F, 0, KeyInt))
                        {
                            TriggerServerEvent("vorp:PlayerForceRespawn");
                            TriggerEvent("vorp:PlayerForceRespawn");
                            API.DoScreenFadeOut(3000);
                            await Delay(3000);
                            await resspawnPlayer();
                            pressKey = true;
                            await Delay(1000);
                        }
                    }
                }
            }
        }