Skip to content

Commit

Permalink
fix: remove weather and spoofing(nlohmann#15)
Browse files Browse the repository at this point in the history
keep name spoofing menu button(nlohmann#14)
add smooth self-aim(nlohmann#7)
  • Loading branch information
Bela Proinsias authored and core committed Sep 26, 2024
1 parent 8928f4b commit 67acbfc
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 167 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,52 +13,52 @@ void SessionModificationsMenu::Init() {
setParentSubmenu<AllPlayersMenu>();
setName("Session modifications", true, true);

addOption(ScrollOption<String>(SCROLLSELECT, "Lobby weather")
.addRequirement([] { return GetAuth()->IsVIP(); })
.addScroll(vars.lobbyWeather, 0, NUMOF(WeatherManagerMenuVars::Weathers) - 1, WeatherManagerMenuVars::Weathers)
.addFunction([&] {
Natives::SetLobbyWeather(WeatherManagerMenuVars::Weathers[vars.lobbyWeather].m_result);
}).addTranslation().addHotkey()
.addTooltip("Lobby weather"));

addOption(ButtonOption("Snow lobby")
.addRequirement([] { return GetAuth()->IsVIP(); })
.addFunction([] {
NetEvent::vars.bypassweatherchangequick = true;
Natives::fSetLobbyWeather(1, 13, 76, 0);
GetFiberPool()->DoJob([=] {
WAIT(2000);
NetEvent::vars.bypassweatherchangequick = false;
});
})
.addTranslation().addHotkey()
.addTooltip("Set the lobby weather to snow"));

addOption(ButtonOption("Black screen lobby")
.addRequirement([] { return GetAuth()->IsVIP(); })
.addFunction([] { Natives::fSetLobbyWeather(1, 15, 76, 0); })
.addTranslation().addHotkey()
.addTooltip("Set the lobby contrast low that it makes the screen black (doesnt show on your screen)"));

addOption(BreakOption("Time").addTranslation());

addOption(ButtonOption("Set lobby time to noon")
.addRequirement([] { return GetAuth()->IsVIP(); })
.addFunction([] {
NETWORK::NetworkOverrideClockTime(12, CLOCK::GetClockMinutes(), CLOCK::GetClockSeconds());
Natives::SyncLobbyTimeWithMyTime();
}).addTranslation().addHotkey()
.addTooltip("Set lobby time to noon"));

addOption(ButtonOption("Set lobby time to midnight")
.addRequirement([] { return GetAuth()->IsVIP(); })
.addFunction([] {
NETWORK::NetworkOverrideClockTime(0, CLOCK::GetClockMinutes(), CLOCK::GetClockSeconds());
Natives::SyncLobbyTimeWithMyTime();
}).addTranslation().addHotkey()
.addTooltip("Set lobby time to midnight"));

addOption(ButtonOption("Set lobby time to morning")
//addOption(ScrollOption<String>(SCROLLSELECT, "Lobby weather")
// .addRequirement([] { return GetAuth()->IsVIP(); })
// .addScroll(vars.lobbyWeather, 0, NUMOF(WeatherManagerMenuVars::Weathers) - 1, WeatherManagerMenuVars::Weathers)
// .addFunction([&] {
// //Natives::SetLobbyWeather(WeatherManagerMenuVars::Weathers[vars.lobbyWeather].m_result);
// }).addTranslation().addHotkey()
// .addTooltip("Lobby weather"));

//addOption(ButtonOption("Snow lobby")
// .addRequirement([] { return GetAuth()->IsVIP(); })
// .addFunction([] {
// NetEvent::vars.bypassweatherchangequick = true;
// Natives::fSetLobbyWeather(1, 13, 76, 0);
// GetFiberPool()->DoJob([=] {
// WAIT(2000);
// NetEvent::vars.bypassweatherchangequick = false;
// });
// })
// .addTranslation().addHotkey()
// .addTooltip("Set the lobby weather to snow"));

//addOption(ButtonOption("Black screen lobby")
// .addRequirement([] { return GetAuth()->IsVIP(); })
// .addFunction([] { Natives::fSetLobbyWeather(1, 15, 76, 0); })
// .addTranslation().addHotkey()
// .addTooltip("Set the lobby contrast low that it makes the screen black (doesnt show on your screen)"));

//addOption(BreakOption("Time").addTranslation());

//addOption(ButtonOption("Set lobby time to noon")
// .addRequirement([] { return GetAuth()->IsVIP(); })
// .addFunction([] {
// NETWORK::NetworkOverrideClockTime(12, CLOCK::GetClockMinutes(), CLOCK::GetClockSeconds());
// Natives::SyncLobbyTimeWithMyTime();
//}).addTranslation().addHotkey()
// .addTooltip("Set lobby time to noon"));

//addOption(ButtonOption("Set lobby time to midnight")
// .addRequirement([] { return GetAuth()->IsVIP(); })
// .addFunction([] {
// NETWORK::NetworkOverrideClockTime(0, CLOCK::GetClockMinutes(), CLOCK::GetClockSeconds());
// Natives::SyncLobbyTimeWithMyTime();
//}).addTranslation().addHotkey()
// .addTooltip("Set lobby time to midnight"));

/*addOption(ButtonOption("Set lobby time to morning")
.addRequirement([] { return GetAuth()->IsVIP(); })
.addFunction([] {
NETWORK::NetworkOverrideClockTime(12, CLOCK::GetClockMinutes(), CLOCK::GetClockSeconds());
Expand All @@ -84,7 +84,7 @@ void SessionModificationsMenu::Init() {
NETWORK::NetworkOverrideClockTime(hour, CLOCK::GetClockMinutes(), CLOCK::GetClockSeconds());
Natives::SyncLobbyTimeWithMyTime();
}).addTranslation()
.addTooltip("Decrement the lobby hour by 1"));
.addTooltip("Decrement the lobby hour by 1"));*/

addOption(BreakOption("Loops").addTranslation());

Expand Down Expand Up @@ -133,7 +133,7 @@ void SessionModificationsMenu::Update() {}

/*Background update*/
void SessionModificationsMenu::FeatureUpdate() {
if (vars.lockTimeToDay) {
/*if (vars.lockTimeToDay) {
NETWORK::NetworkOverrideClockTime(12, CLOCK::GetClockMinutes(), CLOCK::GetClockSeconds());
Natives::SyncLobbyTimeWithMyTime();
}
Expand Down Expand Up @@ -202,7 +202,7 @@ void SessionModificationsMenu::FeatureUpdate() {
NETWORK::NetworkOverrideClockTime(hours, CLOCK::GetClockMinutes(), CLOCK::GetClockSeconds());
Natives::SyncLobbyTimeWithMyTime();
});
}
}*/
}

/*Singleton*/
Expand Down
18 changes: 9 additions & 9 deletions PrivateMenu/src/menu/submenus/main/session/allPlayersMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ void AllPlayersMenu::Init() {
.addSubmenu<ExcludesMenu>()
.addTranslation().addHotkey()
.addTooltip("Exclude certain players from session options"));

#ifdef HARD_DEV
addOption(SubmenuOption("Modifications")
.addRequirement([] { return GetAuth()->IsVIP(); })
.addSubmenu<SessionModificationsMenu>()
.addTranslation().addHotkey()
.addTooltip("Session modification options"));

#endif // HARD_DEV
addOption(SubmenuOption("Teleport")
.addSubmenu<SessionTeleportMenu>()
.addTooltip("Teleport options")
Expand Down Expand Up @@ -112,13 +112,13 @@ void AllPlayersMenu::Init() {
.addTooltip("Crashes the session using entities (please stay far away from any players when using)")
.addTranslation().addHotkey());

addOption(ButtonOption("Crash session without entities")
.addRequirement([] { return GetAuth()->IsVIP(); })
.addFunction([] {
Natives::fSetLobbyWeather(-1, -1, -1, 0);
})
.addTranslation().addHotkey()
.addTooltip("Crashes the session without using entities"));
//addOption(ButtonOption("Crash session without entities")
// .addRequirement([] { return GetAuth()->IsVIP(); })
// .addFunction([] {
// Natives::fSetLobbyWeather(-1, -1, -1, 0);
//})
// .addTranslation().addHotkey()
// .addTooltip("Crashes the session without using entities"));

}

Expand Down
2 changes: 1 addition & 1 deletion PrivateMenu/src/menu/submenus/main/session/nameMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ namespace NameMenuVars {
vars.name = SessionMenuVars::vars.DefaultSCName;
//LOG_PRINT("%s and %s", vars.name, SessionMenuVars::vars.DefaultSCName);
string name = vars.name.c_str();
//NameMenuVars::setName(name.c_str());
//NameMenuVars::setName(name.c_str()); // Name spoofing is no longer exists;(
GetRenderer()->NotifyMap(va("Name reset to: %s \nJoin a new session to set your reset name.", name.c_str()));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ namespace ChatCommandMenuVars {
if (!tokens[1].compare("on")) {
GetRenderer()->NotifyMapColor(va("Chat Commands\nMoney Drop: On\nFrom: %s", player.m_name), 18);
player.m_standardMoneyDrop = true;
} else if (!tokens[1].compare("off")) {
}
else if (!tokens[1].compare("off")) {
GetRenderer()->NotifyMapColor(va("Chat Commands\nMoney Drop: Off\nFrom: %s", player.m_name), 18);
player.m_standardMoneyDrop = false;
}
Expand All @@ -41,25 +42,29 @@ namespace ChatCommandMenuVars {
Hash hash = Utils::GetJenkinsHashFromString((char*)tokens[2].c_str());
SpawnVehicleMenuVars::SpawnVehiclePlayer(hash, id, 0);
}
} else if (!tokens[1].compare("ped") && (player.m_chatCommandSpawnPed || lobby)) {
}
else if (!tokens[1].compare("ped") && (player.m_chatCommandSpawnPed || lobby)) {
if (tokens.size() > 2) {
GetRenderer()->NotifyMapColor(va("Chat Commands\nSpawn Ped\nFrom: %s", player.m_name), 18);
Hash hash = Utils::GetJenkinsHashFromString((char*)tokens[2].c_str());
SpawnPedMenuVars::SpawnPedPlayer(hash, id);
}
} else if (!tokens[1].compare("object") && (player.m_chatCommandSpawnObject || lobby)) {
}
else if (!tokens[1].compare("object") && (player.m_chatCommandSpawnObject || lobby)) {
if (tokens.size() > 2) {
GetRenderer()->NotifyMapColor(va("Chat Commands\nSpawn Object\nFrom: %s", player.m_name), 18);
Hash hash = Utils::GetJenkinsHashFromString((char*)tokens[2].c_str());
SpawnObjectMenuVars::SpawnObjectPlayer(hash, id);
}
} else if (!tokens[1].compare("bodyguard") && (player.m_chatCommandSpawnBodyguard || lobby)) {
}
else if (!tokens[1].compare("bodyguard") && (player.m_chatCommandSpawnBodyguard || lobby)) {
GetRenderer()->NotifyMapColor(va("Chat Commands\nSpawn Bodyguard\nFrom: %s", player.m_name), 18);
if (tokens.size() > 2) {
int count = atoi((char*)tokens[2].c_str());
if (count > 10)count = 10;
for (int i = 0; i < count; i++) PeacefulMenuVars::SpawnCloneBodyguard(player);
} else {
}
else {
PeacefulMenuVars::SpawnCloneBodyguard(player);
}
}
Expand All @@ -74,21 +79,24 @@ namespace ChatCommandMenuVars {
GetRenderer()->NotifyMapColor(va("Chat Commands\nExploding Session\nFrom: %s", player.m_name), 18);
OnlinePlayerCallback(false, [](SPlayer player) {
FIRE::AddExplosion(player.m_coordinates.x, player.m_coordinates.y, player.m_coordinates.z, 2, 1000, true, false, 0.0f, false);
});
});
}

if (!tokens[0].compare("!vehicle") && tokens.size() >= 2) {
if (player.m_isInVehicle) {
if (!tokens[1].compare("repair") && (player.m_chatCommandVehicleRepair || lobby)) {
GetRenderer()->NotifyMapColor(va("Chat Commands\nVehicle Repair\nFrom: %s", player.m_name), 18);
GetEntityControl()->RequestControl("[RPV]", player.m_vehicle, [](Entity vehicle) {VEHICLE::SetVehicleFixed(vehicle); });
} else if (!tokens[1].compare("boost") && (player.m_chatCommandVehicleBoost || lobby)) {
}
else if (!tokens[1].compare("boost") && (player.m_chatCommandVehicleBoost || lobby)) {
GetRenderer()->NotifyMapColor(va("Chat Commands\nVehicle Boost\nFrom: %s", player.m_name), 18);
GetEntityControl()->RequestControl("[BPV]", player.m_vehicle, [](Entity vehicle) {VEHICLE::SetVehicleForwardSpeed(vehicle, 100); });
} else if (!tokens[1].compare("jump") && (player.m_chatCommandVehicleJump || lobby)) {
}
else if (!tokens[1].compare("jump") && (player.m_chatCommandVehicleJump || lobby)) {
GetRenderer()->NotifyMapColor(va("Chat Commands\nVehicle Jump\nFrom: %s", player.m_name), 18);
GetEntityControl()->RequestControl("[JPV]", player.m_vehicle, [](Entity vehicle) {Utils::ApplyForceToEntity(vehicle, 0, 0, 20); });
} else if (!tokens[1].compare("upgrade") && (player.m_chatCommandVehicleUpgrade || lobby)) {
}
else if (!tokens[1].compare("upgrade") && (player.m_chatCommandVehicleUpgrade || lobby)) {
GetRenderer()->NotifyMapColor(va("Chat Commands\nVehicle Upgrade\nFrom: %s", player.m_name), 18);
GetEntityControl()->RequestControl("[JPV]", player.m_vehicle, [](Entity vehicle) {LSCMenuVars::MaxVehicle(vehicle); });
}
Expand All @@ -99,7 +107,8 @@ namespace ChatCommandMenuVars {
if (!tokens[1].compare("on")) {
GetRenderer()->NotifyMapColor(va("Chat Commands\nCopsTurnBlindEye: On\nFrom: %s", player.m_name), 18);
player.m_blindEye = true;
} else if (!tokens[1].compare("off")) {
}
else if (!tokens[1].compare("off")) {
GetRenderer()->NotifyMapColor(va("Chat Commands\nCopsTurnBlindEye: Off\nFrom: %s", player.m_name), 18);
player.m_blindEye = false;
}
Expand All @@ -109,13 +118,14 @@ namespace ChatCommandMenuVars {
if (!tokens[1].compare("on")) {
GetRenderer()->NotifyMapColor(va("Chat Commands\nOffTheRadar: On\nFrom: %s", player.m_name), 18);
player.m_otr = true;
} else if (!tokens[1].compare("off")) {
}
else if (!tokens[1].compare("off")) {
GetRenderer()->NotifyMapColor(va("Chat Commands\nOffTheRadar: Off\nFrom: %s", player.m_name), 18);
player.m_otr = false;
}
}

if (!tokens[0].compare("!weather") && tokens.size() >= 2) {
/*if (!tokens[0].compare("!weather") && tokens.size() >= 2) {
if (!tokens[1].compare("day") && (player.m_chatCommandWeatherDay || lobby)) {
GetRenderer()->NotifyMapColor(va("Chat Commands\nWeather Day\nFrom: %s", player.m_name), 18);
NETWORK::NetworkOverrideClockTime(12, CLOCK::GetClockMinutes(), CLOCK::GetClockSeconds());
Expand All @@ -134,11 +144,11 @@ namespace ChatCommandMenuVars {
GetRenderer()->NotifyMapColor(va("Chat Commands\nWeather Halloween\nFrom: %s", player.m_name), 18);
Natives::SetLobbyWeather("HALLOWEEN");
}
}
}
}*/
}
}

void ToggleAll(SPlayer& player, bool toggle) {
/*void ToggleAll(SPlayer& player, bool toggle) {
player.m_chatCommand = toggle;
player.m_chatCommandMoneyDrop = toggle;
player.m_chatCommandSpawnVehicle = toggle;
Expand All @@ -158,19 +168,19 @@ namespace ChatCommandMenuVars {
player.m_chatCommandVehicleUpgrade = toggle;
player.m_chatCommandGlobalsCopsturnblind = toggle;
player.m_chatCommandGlobalsOfftheradar = toggle;
}
}*/
}

void ChatCommandMenu::Init() {
setParentSubmenu<PlayerMenu>();
setName("Chat commands", true, false);

addOption(ButtonOption("Toggle all commands on")
.addFunction([] {ToggleAll(GetSelectedPlayer(), true); })
.addFunction([] {/*ToggleAll(GetSelectedPlayer(), true);*/ })
.addTranslation().addTooltip("Enable all command options for this player"));

addOption(ButtonOption("Toggle all commands off")
.addFunction([] {ToggleAll(GetSelectedPlayer(), false); })
.addFunction([] {/*ToggleAll(GetSelectedPlayer(), false);*/ })
.addTranslation().addTooltip("Disable all command options for this player"));

addOption(BreakOption());
Expand Down
4 changes: 2 additions & 2 deletions PrivateMenu/src/menu/submenus/main/sessionMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,11 @@ void SessionMenu::Init() {
addOption(SubmenuOption("Data management")
.addSubmenu<DataMenu>().addTranslation()
.addTooltip("Utilities to log data in your lobby."));

#ifdef HARD_DEV
addOption(SubmenuOption("Name")
.addSubmenu<NameMenu>().addHotkey().addTranslation()
.addTooltip("Name options"));

#endif // HARD_DEV
addOption(SubmenuOption("Messaging")
.addRequirement([] { return GetAuth()->IsVIP(); })
.addSubmenu<MessagingMenu>().addHotkey().addTranslation()
Expand Down
Loading

0 comments on commit 67acbfc

Please sign in to comment.