static void func_110(FerrisWheelCamGamePad uParam0, bool bParam1) { uParam0.Value0 = true; uParam0.Value1 = true; uParam0.Value9 = PlayerPedId(); uParam0.Value11 = 0f; uParam0.Value12 = 0f; if (bParam1) uParam0.Value15 = true; }
static int func_109(FerrisWheelCamGamePad uParam0, int iParam1, int iParam2) { if (!uParam0.Value1) return 0; uParam0.Value13 = 50f; if (!DoesCamExist(uParam0.CamEntity.Handle)) uParam0.CamEntity = new Camera(CreateCamWithParams("DEFAULT_SCRIPTED_CAMERA", uParam0.Value2.X, uParam0.Value2.Y, uParam0.Value2.Z, uParam0.Value5.X, uParam0.Value5.Y, uParam0.Value5.Z, 50f, true, 2)); if (uParam0.Value0) { AttachCamToPedBone(uParam0.CamEntity.Handle, PlayerPedId(), 31086, 0f, 0.2f, 0f, true); uParam0.Value11 = 0f; uParam0.Value12 = 0f; } if (DoesCamExist(uParam0.CamEntity.Handle)) SetCamActive(uParam0.CamEntity.Handle, true); return 1; }
static async void func_105(FerrisWheelCamGamePad uParam0) { float uVar0 = 0; float uVar1 = 0; float fVar2; if (!uParam0.Value1) return; DisableInputGroup(2); if (uParam0.Value0) { if (Absf(GetControlNormal(2, 220)) > 0.1f) { uParam0.Value12 = uParam0.Value12 - (GetControlNormal(2, 220) * 60f * Timestep()); if (uParam0.Value15) { if (uParam0.Value12 < -110) uParam0.Value12 = -110; if (uParam0.Value12 > 110) uParam0.Value12 = 110; } else uParam0.Value12 = func_102(uParam0.Value12, -80f, 80f); } if (Absf(GetControlNormal(2, 221)) > 0.1f) { fVar2 = ((GetControlNormal(2, 221) * 60f) * Timestep()); if (IsLookInverted()) fVar2 = (fVar2 * -1f); uParam0.Value11 -= fVar2; if (uParam0.Value14) { if (uParam0.Value11 < -30) uParam0.Value11 = -30; if (uParam0.Value11 > 30) uParam0.Value11 = 30; } else uParam0.Value11 = func_102(uParam0.Value11, -30f, 30f); } if (IsControlJustPressed(2, 231)) { uParam0.Value11 = 0f; uParam0.Value12 = 0f; } if (Absf(GetControlNormal(2, 219)) > 0.1f) { fVar2 = GetControlNormal(2, 219) * (60f / 2f) * Timestep(); uParam0.Value13 = (uParam0.Value13 + fVar2); uParam0.Value13 = func_102(uParam0.Value13, 20f, 50f); } if (DoesCamExist(uParam0.CamEntity.Handle)) { SetCamFov(uParam0.CamEntity.Handle, uParam0.Value13); if (IsEntityDead(uParam0.Value8) && !IsEntityDead(PlayerPedId())) SetCamRot(uParam0.CamEntity.Handle, (Game.PlayerPed.Rotation + new Vector3(uParam0.Value11, 0f, uParam0.Value12)).X, (Game.PlayerPed.Rotation + new Vector3(uParam0.Value11, 0f, uParam0.Value12)).Y, (Game.PlayerPed.Rotation + new Vector3(uParam0.Value11, 0f, uParam0.Value12)).Z, 2); else if (!IsEntityDead(uParam0.Value8) && !IsEntityDead(PlayerPedId())) { func_106(GetEntityCoords(uParam0.Value8, true), GetEntityCoords(uParam0.Value9, true), ref uVar0, ref uVar1, 1); SetCamRot(uParam0.CamEntity.Handle, (new Vector3(uVar1, 0f, uVar0) + new Vector3(uParam0.Value11, 0f, uParam0.Value12)).X, (new Vector3(uVar1, 0f, uVar0) + new Vector3(uParam0.Value11, 0f, uParam0.Value12)).Y, (new Vector3(uVar1, 0f, uVar0) + new Vector3(uParam0.Value11, 0f, uParam0.Value12)).Z, 2); } } } }