diff --git a/ChaosMod/ChaosMod.vcxproj b/ChaosMod/ChaosMod.vcxproj index c5a65da5c..75b138022 100644 --- a/ChaosMod/ChaosMod.vcxproj +++ b/ChaosMod/ChaosMod.vcxproj @@ -101,6 +101,7 @@ + diff --git a/ChaosMod/Effects/db/Misc/MiscComplicationsJump.cpp b/ChaosMod/Effects/db/Misc/MiscComplicationsJump.cpp new file mode 100644 index 000000000..605763290 --- /dev/null +++ b/ChaosMod/Effects/db/Misc/MiscComplicationsJump.cpp @@ -0,0 +1,51 @@ +/* + Effect By OnlyRealNubs +*/ + +#include + +#include "Memory/Physics.h" +#include "Memory/Hooks/ScriptThreadRunHook.h" + +static void OnStart() +{ + Hooks::EnableScriptThreadBlock(); + Ped player = PLAYER_PED_ID(); + + Vehicle veh = CreatePoolVehicle(GET_HASH_KEY("TAILGATER"), -750.44f, 66.58f, 54.58f, 23.29f); //53.28f + SET_VEHICLE_ENGINE_ON(veh, true, true, false); + SET_ENTITY_ROTATION(veh, 25.f, 0.f, 23.29f, 2, true); + + //Create the gardener truck + Vehicle tempVeh = CreatePoolVehicle(GET_HASH_KEY("BISON3"), -801.25f, 164.60f, 71.07f, 110.f); + SET_VEHICLE_MOD_COLOR_1(tempVeh, 0, 111, 0); + + SET_PED_INTO_VEHICLE(player, veh, -1); + SET_ENTITY_INVINCIBLE(player, true); + + Memory::ApplyForceToEntityCenterOfMass(veh, 1, 0.f, 100.f, 0.f, false, true, true, false); + + WAIT(1500); + TASK_LEAVE_VEHICLE(player, veh, 4160); + + int waited = 0; + while (!IS_PED_GETTING_UP(player) && waited < 100) + { + WAIT(100); + waited++; + } + + SET_ENTITY_INVINCIBLE(player, false); + Hooks::DisableScriptThreadBlock(); + SET_VEHICLE_AS_NO_LONGER_NEEDED(&veh); + SET_VEHICLE_AS_NO_LONGER_NEEDED(&tempVeh); +} + +// clang-format off +REGISTER_EFFECT(OnStart, nullptr, nullptr, EffectInfo + { + .Name = "Complications", + .Id = "misc_complications", + .EffectGroupType = EEffectGroupType::Teleport, + } +); diff --git a/ConfigApp/Effects.cs b/ConfigApp/Effects.cs index b12c97e8c..3d8bc88f7 100644 --- a/ConfigApp/Effects.cs +++ b/ConfigApp/Effects.cs @@ -372,6 +372,7 @@ public enum EffectTimedType { "screen_colorfulworld", new EffectInfo("Colorful World", EffectCategory.Screen, true) }, { "screen_arc", new EffectInfo("Arced Screen", EffectCategory.Screen, true, true) }, { "world_blackhole", new EffectInfo("Black Hole", EffectCategory.Misc, true, true) }, + { "misc_complications", new EffectInfo("Complications", EffectCategory.Misc) }, { "misc_solid_props", new EffectInfo("Solid Props", EffectCategory.Misc, true) }, { "peds_smoketrails", new EffectInfo("Smoke Trails", EffectCategory.Peds, true) }, { "misc_randomgravity", new EffectInfo("Random Gravity", EffectCategory.Misc, true) },