mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-05 17:13:29 +08:00
feat(Self): Added no ragdoll
This commit is contained in:
parent
b8416192c8
commit
05f591fb9c
@ -12,6 +12,7 @@ namespace big
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
{
|
||||
looped::self_godmode();
|
||||
looped::self_no_ragdoll();
|
||||
}QUEUE_JOB_END_CLAUSE
|
||||
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
|
@ -7,6 +7,7 @@ namespace big
|
||||
public:
|
||||
static void self_godmode();
|
||||
static void self_noclip();
|
||||
static void self_no_ragdoll();
|
||||
|
||||
static void weapons_cage_gun();
|
||||
static void weapons_delete_gun();
|
||||
|
21
BigBaseV2/src/backend/looped/self/no_ragdoll.cpp
Normal file
21
BigBaseV2/src/backend/looped/self/no_ragdoll.cpp
Normal file
@ -0,0 +1,21 @@
|
||||
#include "backend/looped/looped.hpp"
|
||||
#include "natives.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
static bool bLastNoRagdoll = false;
|
||||
|
||||
void looped::self_no_ragdoll()
|
||||
{
|
||||
bool bNoRagdoll = g.self.no_ragdoll;
|
||||
Ped player = PLAYER::PLAYER_PED_ID();
|
||||
|
||||
if ((bNoRagdoll && PED::IS_PED_RUNNING_RAGDOLL_TASK(player)) || (!bNoRagdoll && bNoRagdoll != bLastNoRagdoll))
|
||||
{
|
||||
if (ENTITY::GET_ENTITY_HEIGHT_ABOVE_GROUND(player) < 1.0)
|
||||
TASK::CLEAR_PED_TASKS_IMMEDIATELY(player);
|
||||
|
||||
bLastNoRagdoll = bNoRagdoll;
|
||||
}
|
||||
}
|
||||
}
|
@ -12,6 +12,7 @@ struct globals {
|
||||
struct self {
|
||||
bool godmode = false;
|
||||
bool noclip = false;
|
||||
bool no_ragdoll = false;
|
||||
};
|
||||
|
||||
struct vehicle {
|
||||
@ -31,6 +32,7 @@ struct globals {
|
||||
void from_json(const nlohmann::json& j)
|
||||
{
|
||||
this->self.godmode = j["self"]["godmode"];
|
||||
this->self.no_ragdoll = j["self"]["no_ragdoll"];
|
||||
|
||||
this->vehicle.horn_boost = j["vehicle"]["horn_boost"];
|
||||
this->vehicle.speedo_meter = (SpeedoMeter)j["vehicle"]["speedo_meter"];
|
||||
@ -43,7 +45,8 @@ struct globals {
|
||||
return nlohmann::json{
|
||||
{
|
||||
"self", {
|
||||
{ "godmode", this->self.godmode }
|
||||
{ "godmode", this->self.godmode },
|
||||
{ "no_ragdoll", this->self.no_ragdoll }
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -110,6 +113,7 @@ struct globals {
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
bool save()
|
||||
{
|
||||
std::string settings_file = std::getenv("appdata");
|
||||
|
@ -8,6 +8,7 @@ namespace big
|
||||
{
|
||||
ImGui::Checkbox("God Mode", &g.self.godmode);
|
||||
ImGui::Checkbox("No Clip", &g.self.noclip);
|
||||
ImGui::Checkbox("No Ragdoll", &g.self.no_ragdoll);
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user