diff --git a/RageCoop.Client.Installer/MainWindow.xaml.cs b/RageCoop.Client.Installer/MainWindow.xaml.cs index e9a80b8..12f415a 100644 --- a/RageCoop.Client.Installer/MainWindow.xaml.cs +++ b/RageCoop.Client.Installer/MainWindow.xaml.cs @@ -78,10 +78,10 @@ namespace RageCoop.Client.Installer Environment.Exit(1); } var shvdnVer = GetVer(shvdnPath); - if (shvdnVer < new Version(3, 5, 1)) + if (shvdnVer < new Version(3, 6, 0)) { MessageBox.Show("Please update ScriptHookVDotNet to latest version!" + - $"\nCurrent version is {shvdnVer}, 3.5.1 or higher is required"); + $"\nCurrent version is {shvdnVer}, 3.6.0 or higher is required"); Environment.Exit(1); } if (File.Exists(lemonPath)) diff --git a/RageCoop.Client/Scripting/BaseScript.cs b/RageCoop.Client/Scripting/BaseScript.cs index 0a389af..8d489ae 100644 --- a/RageCoop.Client/Scripting/BaseScript.cs +++ b/RageCoop.Client/Scripting/BaseScript.cs @@ -46,7 +46,7 @@ namespace RageCoop.Client.Scripting int weather1 = default(int); int weather2 = default(int); float percent2 = default(float); - Function.Call(Hash._GET_WEATHER_TYPE_TRANSITION, &weather1, &weather2, &percent2); + Function.Call(Hash.GET_CURR_WEATHER_STATE, &weather1, &weather2, &percent2); API.SendCustomEvent(CustomEvents.WeatherTimeSync, time.Hours, time.Minutes, time.Seconds, weather1, weather2, percent2); } }); @@ -60,7 +60,7 @@ namespace RageCoop.Client.Scripting private void WeatherTimeSync(CustomEventReceivedArgs e) { World.CurrentTimeOfDay = new TimeSpan((int)e.Args[0], (int)e.Args[1], (int)e.Args[2]); - Function.Call(Hash._SET_WEATHER_TYPE_TRANSITION, (int)e.Args[3], (int)e.Args[4], (float)e.Args[5]); + Function.Call(Hash.SET_CURR_WEATHER_STATE, (int)e.Args[3], (int)e.Args[4], (float)e.Args[5]); } private void SetDisplayNameTag(CustomEventReceivedArgs e) diff --git a/RageCoop.Client/Sync/Entities/Ped/SyncedPed.cs b/RageCoop.Client/Sync/Entities/Ped/SyncedPed.cs index 9660aaa..0a5d75e 100644 --- a/RageCoop.Client/Sync/Entities/Ped/SyncedPed.cs +++ b/RageCoop.Client/Sync/Entities/Ped/SyncedPed.cs @@ -28,7 +28,7 @@ namespace RageCoop.Client MainPed = p; OwnerID = Main.LocalPlayerID; - Function.Call(Hash._SET_PED_CAN_PLAY_INJURED_ANIMS, false); + Function.Call(Hash.SET_PED_IS_IGNORED_BY_AUTO_OPEN_DOORS, false); MainPed.SetConfigFlag((int)PedConfigFlags.CPED_CONFIG_FLAG_DisableHurt, true); // MainPed.SetConfigFlag((int)PedConfigFlags.CPED_CONFIG_FLAG_DisableMelee, true); @@ -235,7 +235,7 @@ namespace RageCoop.Client Function.Call(Hash.SET_PED_CAN_BE_TARGETTED_BY_PLAYER, MainPed.Handle, Game.Player, true); Function.Call(Hash.SET_PED_GET_OUT_UPSIDE_DOWN_VEHICLE, MainPed.Handle, false); Function.Call(Hash.SET_CAN_ATTACK_FRIENDLY, MainPed.Handle, true, true); - Function.Call(Hash._SET_PED_CAN_PLAY_INJURED_ANIMS, false); + Function.Call(Hash.SET_PED_IS_IGNORED_BY_AUTO_OPEN_DOORS, false); Function.Call(Hash.SET_PED_CAN_EVASIVE_DIVE, MainPed.Handle, false); MainPed.SetConfigFlag((int)PedConfigFlags.CPED_CONFIG_FLAG_DrownsInWater, false); @@ -713,7 +713,7 @@ namespace RageCoop.Client case 5: if (MainPed.VehicleTryingToEnter != CurrentVehicle.MainVehicle || MainPed.GetSeatTryingToEnter() != Seat) { - MainPed.Task.EnterVehicle(CurrentVehicle.MainVehicle, Seat, -1, 5, EnterVehicleFlags.AllowJacking); + MainPed.Task.EnterVehicle(CurrentVehicle.MainVehicle, Seat, -1, 5, EnterVehicleFlags.JackAnyone); } break; case 6: diff --git a/RageCoop.Client/Sync/Entities/Vehicle/SyncedVehicle.cs b/RageCoop.Client/Sync/Entities/Vehicle/SyncedVehicle.cs index 9c20dcb..d99e89b 100644 --- a/RageCoop.Client/Sync/Entities/Vehicle/SyncedVehicle.cs +++ b/RageCoop.Client/Sync/Entities/Vehicle/SyncedVehicle.cs @@ -197,13 +197,13 @@ namespace RageCoop.Client if (!_lastTransformed) { _lastTransformed = true; - Function.Call(Hash._TRANSFORM_VEHICLE_TO_SUBMARINE, MainVehicle.Handle, false); + Function.Call(Hash.TRANSFORM_TO_SUBMARINE, MainVehicle.Handle, false); } } else if (_lastTransformed) { _lastTransformed = false; - Function.Call(Hash._TRANSFORM_SUBMARINE_TO_VEHICLE, MainVehicle.Handle, false); + Function.Call(Hash.TRANSFORM_TO_CAR, MainVehicle.Handle, false); } } else if (IsDeluxo) @@ -364,7 +364,7 @@ namespace RageCoop.Client private void StartPedalingAnim(bool fast) { - MainVehicle.Driver?.Task.PlayAnimation(PedalingAnimDict(), PedalingAnimName(fast), 8.0f, -8.0f, -1, AnimationFlags.Loop | AnimationFlags.AllowRotation, 1.0f); + MainVehicle.Driver?.Task.PlayAnimation(PedalingAnimDict(), PedalingAnimName(fast), 8.0f, -8.0f, -1, AnimationFlags.Loop | AnimationFlags.Secondary, 1.0f); } diff --git a/RageCoop.Client/Util/VehicleExtensions.cs b/RageCoop.Client/Util/VehicleExtensions.cs index 6b601f0..af5df8c 100644 --- a/RageCoop.Client/Util/VehicleExtensions.cs +++ b/RageCoop.Client/Util/VehicleExtensions.cs @@ -50,7 +50,7 @@ namespace RageCoop.Client flags |= VehicleDataFlags.IsHornActive; } - if (v.IsSubmarineCar && Function.Call(Hash._GET_IS_SUBMARINE_VEHICLE_TRANSFORMED, veh.Handle)) + if (v.IsSubmarineCar && Function.Call(Hash.IS_VEHICLE_IN_SUBMARINE_MODE, veh.Handle)) { flags |= VehicleDataFlags.IsTransformed; } @@ -89,7 +89,7 @@ namespace RageCoop.Client } public static bool IsRocketBoostActive(this Vehicle veh) { - return Function.Call(Hash._IS_VEHICLE_ROCKET_BOOST_ACTIVE, veh); + return Function.Call(Hash.IS_ROCKET_BOOST_ACTIVE, veh); } public static bool IsParachuteActive(this Vehicle veh) { @@ -97,7 +97,7 @@ namespace RageCoop.Client } public static void SetRocketBoostActive(this Vehicle veh, bool toggle) { - Function.Call(Hash._SET_VEHICLE_ROCKET_BOOST_ACTIVE, veh, toggle); + Function.Call(Hash.SET_ROCKET_BOOST_ACTIVE, veh, toggle); } public static void SetParachuteActive(this Vehicle veh, bool toggle) { @@ -242,7 +242,7 @@ namespace RageCoop.Client public static void SetDeluxoHoverState(this Vehicle deluxo, bool hover) { - Function.Call(Hash._SET_VEHICLE_HOVER_TRANSFORM_PERCENTAGE, deluxo, hover ? 1f : 0f); + Function.Call(Hash.SET_SPECIAL_FLIGHT_MODE_TARGET_RATIO, deluxo, hover ? 1f : 0f); } public static bool IsDeluxoHovering(this Vehicle deluxo) { @@ -250,7 +250,7 @@ namespace RageCoop.Client } public static void SetDeluxoWingRatio(this Vehicle v, float ratio) { - Function.Call(Hash._SET_SPECIALFLIGHT_WING_RATIO, v, ratio); + Function.Call(Hash.SET_HOVER_MODE_WING_RATIO, v, ratio); } public static float GetDeluxoWingRatio(this Vehicle v) { @@ -258,7 +258,7 @@ namespace RageCoop.Client } public static float GetNozzleAngel(this Vehicle plane) { - return Function.Call(Hash._GET_VEHICLE_FLIGHT_NOZZLE_POSITION, plane); + return Function.Call(Hash.GET_VEHICLE_FLIGHT_NOZZLE_POSITION, plane); } public static bool HasNozzle(this Vehicle v) { diff --git a/RageCoop.Server/RageCoop.Server.csproj b/RageCoop.Server/RageCoop.Server.csproj index ab0f1c3..d11cadd 100644 --- a/RageCoop.Server/RageCoop.Server.csproj +++ b/RageCoop.Server/RageCoop.Server.csproj @@ -49,12 +49,12 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/libs/ScriptHookVDotNet.dll b/libs/ScriptHookVDotNet.dll index d2aad63..50e4634 100644 Binary files a/libs/ScriptHookVDotNet.dll and b/libs/ScriptHookVDotNet.dll differ diff --git a/libs/ScriptHookVDotNet2.dll b/libs/ScriptHookVDotNet2.dll deleted file mode 100644 index 897cb26..0000000 Binary files a/libs/ScriptHookVDotNet2.dll and /dev/null differ diff --git a/libs/ScriptHookVDotNet3.dll b/libs/ScriptHookVDotNet3.dll index 6ab2498..c54ed76 100644 Binary files a/libs/ScriptHookVDotNet3.dll and b/libs/ScriptHookVDotNet3.dll differ