Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Commit

Permalink
Add feature
Browse files Browse the repository at this point in the history
  • Loading branch information
AmazingPP committed Sep 10, 2020
1 parent 0d9e82e commit 712e911
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 11 deletions.
28 changes: 25 additions & 3 deletions subVersion/hack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,7 @@ void hack::createAmbientPickup(unsigned int pickupHash, float posX, float posY,
if (m_unkModel.m_dwModelHash != modelHash)
m_unkModel.setModelHash(modelHash);

Sleep(100);
Sleep(150);
m_replayInterface.getCurPedNum();
for (size_t i = 0; i < m_replayInterface.dw_curPickUpNum; i++)
{
Expand Down Expand Up @@ -1214,11 +1214,11 @@ void hack::killAllNpc(float* arg)
}
}

void hack::renderPlayerList(int parent,int playerList[32])
void hack::renderPlayerList()
{
for (size_t i = 0; i < 32; i++)
{
g_pSettings->updataFeature(playerList[i], -1, parent, L"玩家" + std::to_wstring(i), feat_teleport,tp_static, -1336.f, -3044.f, -225.f);
g_pSettings->updataFeature(g_iFeaturePlayerList[i], -1, g_iFeature[FEATURE_P_PLAYER_LIST], L"玩家" + std::to_wstring(i), feat_teleport,tp_static, -1336.f, -3044.f, -225.f);
}
}

Expand Down Expand Up @@ -2199,6 +2199,28 @@ void hack::tunableAntiIdleKick(feat* feature)
return;
}

void hack::removeSuicideCooldown(feat* feature)
{
if (!feature->m_bOn)
{
if (!feature->m_bRestored)
{
scriptGlobal(262145).at(27617).as<int>() = 300000;
scriptGlobal(262145).at(27618).as<int>() = 60000;
feature->m_bRestored = true;
}
return;
}
if (scriptGlobal(2537071).at(6599).as<int>() != -1)
scriptGlobal(2537071).at(6599).as<int>() = -1;
if (scriptGlobal(262145).at(27617).as<int>() != 0)
scriptGlobal(262145).at(27617).as<int>() = 0;
if (scriptGlobal(262145).at(27618).as<int>() != 0)
scriptGlobal(262145).at(27618).as<int>() = 0;

return;
}

void hack::removePassiveModeCooldown(feat* feature)
{
if (!feature->m_bOn)
Expand Down
3 changes: 2 additions & 1 deletion subVersion/hack.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class hack : public trainer
void fillAmmo();
void consumeStatQueue();
void killAllNpc(float* arg);
void renderPlayerList(int parent, int playerList[32]);
void renderPlayerList();
void setImpactExplosion(float* arg);
//void fillAllAmmo(float* arg);
void healVehicle(float* arg);
Expand Down Expand Up @@ -150,6 +150,7 @@ class hack : public trainer
void tunableOrbitalCannonCooldown(feat* feature);
void tunableBunkerResearch(feat* feature);
void tunableAntiIdleKick(feat* feature);
void removeSuicideCooldown(feat* feature);
void removePassiveModeCooldown(feat* feature);
void allowSellOnNonPublic(feat* feature);
void instantBullShark(feat* feature);
Expand Down
12 changes: 5 additions & 7 deletions subVersion/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ int __stdcall WinMain( HINSTANCE hInstance,
g_pCBMap = new std::map<int, CallbackProxy<hack, float>*>;

LPCSTR szWindowTitleTarget = "Grand Theft Auto V";
LPCWSTR szWindowTitle = L"subVersion mAsk°重制版 v1.3.2";
LPCWSTR szWindowTitle = L"subVersion mAsk°重制版 v1.3.3";
g_pMemMan->setWindowName(szWindowTitleTarget);
g_pD3D9Render->m_szWindowTitle = szWindowTitle;

Expand Down Expand Up @@ -227,11 +227,9 @@ int __stdcall WinMain( HINSTANCE hInstance,
int olService = g_pSettings->addFeature(4, -1, L"线上 >>", feat_parent);
addFeature(-1, olService, L"坐进个人载具", feat_btn, &hack::intoPV, -1.f);
g_iFeature[FEATURE_P_MONERY_DROP] = g_pSettings->addFeature(-1, olService, L"钱袋刷钱(10K)", feat_toggle, "moneyDrop");
//g_iFeature[FEATURE_P_PLAYER_LIST] = g_pSettings->addFeature(3, -1, "玩家列表 >>", feat_parent);
g_iFeature[FEATURE_P_PLAYER_LIST] = g_pSettings->addFeature(3, -1, L"玩家列表 >>", feat_parent);
//for (size_t i = 0; i < sizeof(g_iFeaturePlayerList)/sizeof(g_iFeaturePlayerList[0]); i++)
//{
// g_iFeaturePlayerList[i] = g_pSettings->addFeature(-1, g_iFeature[FEATURE_P_PLAYER_LIST],"线上 >>", feat_parent);
//}
// g_iFeaturePlayerList[i] = g_pSettings->addFeature(-1, g_iFeature[FEATURE_P_PLAYER_LIST], L"线上 >>", feat_parent);
int vehSpawn = g_pSettings->addFeature(-1, olService, L"刷车 >>", feat_parent);
for (size_t i = 0; i < vehiclePreview.size(); i++)
{
Expand All @@ -243,6 +241,7 @@ int __stdcall WinMain( HINSTANCE hInstance,
int tunable = g_pSettings->addFeature(-1, olService, L"可调参数 >>", feat_parent);
g_iFeature[FEATURE_T_ANTI_IDLE_KICK] = g_pSettings->addFeature(-1, tunable, L"AFK反挂机踢出", feat_toggle, "AntiIdleKick");
g_iFeature[FEATURE_T_ORBITAL_CANNON] = g_pSettings->addFeature(-1, tunable, L"天基炮无冷却", feat_toggle, "OrbitalCannon");
g_iFeature[FEATURE_T_SUICIDE_CD] = g_pSettings->addFeature(-1, tunable, L"自杀无冷却", feat_toggle, "SuicideCD");
g_iFeature[FEATURE_T_RP_MP] = g_pSettings->addFeature(-1, tunable, L"RP倍数", feat_slider,"RP", 1.f, 1000.f , (float)1.f / 9.f);
g_iFeature[FEATURE_T_AP_MP] = g_pSettings->addFeature(-1, tunable, L"AP倍数", feat_slider, "AP", 1.f, 1000.f, (float)1.f / 9.f);
g_iFeature[FEATURE_T_MISSION_PAYOUT] = g_pSettings->addFeature(-1, tunable, L"最小任务金额", feat_slider, "MinMissionPayout", 0.f, 100000.f);
Expand Down Expand Up @@ -603,10 +602,9 @@ DWORD __stdcall threadHack(LPVOID lpParam)
g_pHack->antiRemoteForceMission(g_pSettings->getFeature(g_iFeature[FEATURE_G_ANTI_SEND_MISSION]));
g_pHack->offRadar(g_pSettings->getFeature(g_iFeature[FEATURE_G_OFF_RADAR]));
g_pHack->instantBullShark(g_pSettings->getFeature(g_iFeature[FEATURE_G_BULL_SHARK]));
g_pHack->removeSuicideCooldown(g_pSettings->getFeature(g_iFeature[FEATURE_T_SUICIDE_CD]));
g_pHack->consumeStatQueue();
}

//g_pHack->renderPlayerList(g_iFeature[FEATURE_P_PLAYER_LIST], g_iFeaturePlayerList);
}
Sleep(1);
}
Expand Down
2 changes: 2 additions & 0 deletions subVersion/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,8 @@ featParent::~featParent() {}

void featParent::toggle()
{
if (m_szName == L"玩家列表 >>")
g_pHack->renderPlayerList();
m_iActiveFeatureRet = g_pSettings->getActiveFeature();
m_iDisplayOffsetRet = g_pSettings->getDisplayOffset();
g_pSettings->fillFeatureCurBuffer(this->m_iId, FFB_PARENT);
Expand Down
1 change: 1 addition & 0 deletions subVersion/settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,4 @@ OrbitalCannon=0
AntiIdleKick=1
moneyDrop=0
disableThePhone=0
SuicideCD=0
3 changes: 3 additions & 0 deletions subVersion/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@
#define FEATURE_G_OFF_RADAR 0x50
#define FEATURE_G_BULL_SHARK 0x51
#define FEATURE_G_ANTI_CEO_KICK 0x52
#define FEATURE_T_SUICIDE_CD 0x53

static std::wstring StringToWString(const std::string& str) {
int num = MultiByteToWideChar(CP_UTF8, 0, str.c_str(), -1, NULL, 0);
Expand Down Expand Up @@ -308,6 +309,8 @@ DWORD strToVk(std::string str);

extern HWND g_hWnd;
extern int g_iFeature[MAX_MENU_FEATURES];
extern int g_iIndex;
extern int g_iFeaturePlayerList[32];

extern bool g_bKillSwitch;
extern bool g_bKillRender;
Expand Down

0 comments on commit 712e911

Please sign in to comment.