Update to 1.67 (#1407)
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
#include "core/scr_globals.hpp"
|
||||
#include "script_local.hpp"
|
||||
#include "services/tunables/tunables_service.hpp"
|
||||
#include "util/math.hpp"
|
||||
#include "util/scripts.hpp"
|
||||
#include "util/teleport.hpp"
|
||||
@ -7,7 +8,7 @@
|
||||
|
||||
namespace big
|
||||
{
|
||||
int get_land_mark_beast_is_closest_to(player_ptr player, script_local land_mark_list)
|
||||
int get_land_mark_beast_is_closest_to(player_ptr player, script_local land_mark_list, int num_landmarks)
|
||||
{
|
||||
if (!player->get_ped() || !player->get_ped()->m_navigation)
|
||||
return -1;
|
||||
@ -18,7 +19,7 @@ namespace big
|
||||
player->get_ped()->m_navigation->get_position()->z);
|
||||
float distance = math::distance_between_vectors(transformed_vector, *land_mark_list.at(0, 3).as<Vector3*>());
|
||||
|
||||
for (int i = 1; i < *script_global(262145).at(11711).as<int*>(); i++)
|
||||
for (int i = 1; i < num_landmarks; i++)
|
||||
{
|
||||
float new_distance = math::distance_between_vectors(transformed_vector, *land_mark_list.at(i, 3).as<Vector3*>());
|
||||
if (new_distance < distance)
|
||||
@ -46,22 +47,26 @@ namespace big
|
||||
});
|
||||
|
||||
ImGui::Spacing();
|
||||
|
||||
auto beast_land_mark_list = script_local(hunt_the_beast_script_thread, 599).at(1).at(19);
|
||||
auto beast_land_marks = *script_global(262145).at(11711).as<int*>();
|
||||
|
||||
auto beast_land_mark_list =
|
||||
script_local(hunt_the_beast_script_thread, scr_locals::am_hunt_the_beast::broadcast_idx).at(1).at(19);
|
||||
static int* num_landmarks = nullptr;
|
||||
|
||||
if (!num_landmarks)
|
||||
num_landmarks = g_tunables_service->get_tunable<int*>(RAGE_JOAAT("HUNT_THE_BEAST_NUMBER_OF_ACTIVE_LANDMARKS"));
|
||||
|
||||
if (ImGui::ListBoxHeader("##beastlandmarks", ImVec2(400, 300)))
|
||||
{
|
||||
for (int i = 0; i < beast_land_marks; i++)
|
||||
for (int i = 0; i < (num_landmarks ? *num_landmarks : 10); i++)
|
||||
{
|
||||
auto script_local_land_mark = *beast_land_mark_list.at(i, 3).as<Vector3*>();
|
||||
std::string label = std::format("Tp to landmark {} at {} {} {}",
|
||||
std::string label = std::format("TP To Landmark {} at {} {} {}",
|
||||
i,
|
||||
script_local_land_mark.x,
|
||||
script_local_land_mark.y,
|
||||
script_local_land_mark.z);
|
||||
|
||||
if (ImGui::Selectable(label.data(), i == get_land_mark_beast_is_closest_to(g_player_service->get_by_id(beast_player_index), beast_land_mark_list)))
|
||||
if (ImGui::Selectable(label.data(), i == get_land_mark_beast_is_closest_to(g_player_service->get_by_id(beast_player_index), beast_land_mark_list, num_landmarks ? *num_landmarks : 10)))
|
||||
g_fiber_pool->queue_job([script_local_land_mark, beast] {
|
||||
teleport::teleport_player_to_coords(g.player.spectating ? beast : g_player_service->get_self(), script_local_land_mark);
|
||||
});
|
||||
|
@ -3,11 +3,11 @@
|
||||
#include "gta_util.hpp"
|
||||
#include "script_local.hpp"
|
||||
#include "util/scripts.hpp"
|
||||
#include "views/view.hpp"
|
||||
#include "views/network/missions/hunt_the_beast.hpp"
|
||||
#include "views/network/missions/king_of_the_castle.hpp"
|
||||
#include "views/network/missions/cp_collection.hpp"
|
||||
#include "views/network/missions/criminal_damage.hpp"
|
||||
#include "views/network/missions/hunt_the_beast.hpp"
|
||||
#include "views/network/missions/king_of_the_castle.hpp"
|
||||
#include "views/view.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
@ -72,16 +72,16 @@ namespace big
|
||||
|
||||
ImGui::BeginGroup();
|
||||
components::button("One-On-One Deathmatch", [] {
|
||||
scripts::start_launcher_script(197);
|
||||
scripts::start_launcher_script(204);
|
||||
});
|
||||
components::button("Impromptu Race", [] {
|
||||
scripts::start_launcher_script(16);
|
||||
});
|
||||
components::button("Flight School", [] {
|
||||
scripts::start_launcher_script(196);
|
||||
scripts::start_launcher_script(203);
|
||||
});
|
||||
components::button("Golf", [] {
|
||||
scripts::start_launcher_script(193);
|
||||
scripts::start_launcher_script(200);
|
||||
});
|
||||
components::button("Tutorial", [] {
|
||||
scripts::start_launcher_script(20);
|
||||
@ -94,19 +94,28 @@ namespace big
|
||||
|
||||
ImGui::BeginGroup();
|
||||
components::button("Gunslinger", [] {
|
||||
scripts::start_launcher_script(211);
|
||||
scripts::start_launcher_script(218);
|
||||
});
|
||||
components::button("Space Monkey", [] {
|
||||
scripts::start_launcher_script(216);
|
||||
scripts::start_launcher_script(223);
|
||||
});
|
||||
components::button("Wizard", [] {
|
||||
scripts::start_launcher_script(212);
|
||||
scripts::start_launcher_script(219);
|
||||
});
|
||||
components::button("QUB3D", [] {
|
||||
scripts::start_launcher_script(217);
|
||||
scripts::start_launcher_script(224);
|
||||
});
|
||||
components::button("Camhedz", [] {
|
||||
scripts::start_launcher_script(218);
|
||||
scripts::start_launcher_script(225);
|
||||
});
|
||||
ImGui::EndGroup();
|
||||
|
||||
ImGui::BeginGroup();
|
||||
components::button("Ghost Hunt", [] {
|
||||
scripts::start_launcher_script(174);
|
||||
});
|
||||
components::button("Possesed Animals", [] {
|
||||
scripts::start_launcher_script(179);
|
||||
});
|
||||
ImGui::EndGroup();
|
||||
|
||||
@ -121,7 +130,7 @@ namespace big
|
||||
if (check_script(RAGE_JOAAT("am_king_of_the_castle")))
|
||||
render_king_of_the_castle_ui();
|
||||
|
||||
if(check_script(RAGE_JOAAT("am_hunt_the_beast")))
|
||||
if (check_script(RAGE_JOAAT("am_hunt_the_beast")))
|
||||
render_hunt_the_beast_ui();
|
||||
|
||||
if (!mission_found)
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
#include <network/Network.hpp>
|
||||
#include <script/globals/GPBD_FM_3.hpp>
|
||||
#include <script/globals/GlobalPlayerBD.hpp>
|
||||
|
||||
namespace big
|
||||
{
|
||||
@ -171,14 +172,14 @@ namespace big
|
||||
|
||||
if (ImGui::SliderInt("WANTED_LVL"_T.data(), &global_wanted_level, 0, 5))
|
||||
{
|
||||
*scr_globals::globalplayer_bd.at(self::id, scr_globals::size::globalplayer_bd).at(213).as<int*>() = global_wanted_level;
|
||||
scr_globals::globalplayer_bd.as<GlobalPlayerBD*>()->Entries[self::id].RemoteWantedLevelAmount = global_wanted_level;
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Checkbox("FORCE"_T.data(), &g.session.wanted_level_all))
|
||||
{
|
||||
*scr_globals::globalplayer_bd.at(self::id, scr_globals::size::globalplayer_bd).at(212).as<Player*>() = __rdtsc() + 32;
|
||||
*scr_globals::globalplayer_bd.at(self::id, scr_globals::size::globalplayer_bd).at(213).as<int*>() = global_wanted_level;
|
||||
scr_globals::globalplayer_bd.as<GlobalPlayerBD*>()->Entries[self::id].RemoteWantedLevelPlayer = __rdtsc() + 32;
|
||||
scr_globals::globalplayer_bd.as<GlobalPlayerBD*>()->Entries[self::id].RemoteWantedLevelAmount = global_wanted_level;
|
||||
}
|
||||
|
||||
components::command_button<"killall">({}, "KILL_ALL"_T);
|
||||
|
@ -12,9 +12,9 @@ namespace big
|
||||
return gta_util::get_network()->m_game_session_ptr->is_host();
|
||||
};
|
||||
|
||||
components::player_command_button<"breakup">(g_player_service->get_selected());
|
||||
ImGui::SameLine();
|
||||
components::command_checkbox<"breakupcheating">();
|
||||
//components::player_command_button<"breakup">(g_player_service->get_selected());
|
||||
//ImGui::SameLine();
|
||||
//components::command_checkbox<"breakupcheating">();
|
||||
|
||||
components::player_command_button<"bailkick">(g_player_service->get_selected());
|
||||
ImGui::SameLine();
|
||||
|
@ -109,8 +109,6 @@ namespace big
|
||||
toxic::start_activity(g_player_service->get_selected(), eActivityType::Skydive);
|
||||
});
|
||||
ImGui::SameLine();
|
||||
components::player_command_button<"cayotp">(g_player_service->get_selected(), {});
|
||||
ImGui::SameLine();
|
||||
components::player_command_button<"interiortp">(g_player_service->get_selected(), {81}, "TP To MOC");
|
||||
|
||||
components::player_command_button<"interiortp">(g_player_service->get_selected(), {123}, "TP To Casino");
|
||||
|
@ -34,7 +34,6 @@ namespace big
|
||||
ImGui::Checkbox("SPECTATE"_T.data(), &g.protections.script_events.spectate);
|
||||
ImGui::Checkbox("VEHICLE_KICK"_T.data(), &g.protections.script_events.vehicle_kick);
|
||||
ImGui::Checkbox("WANTED_LEVEL"_T.data(), &g.protections.script_events.clear_wanted_level);
|
||||
ImGui::Checkbox("DESYNC_KICK"_T.data(), &g.protections.desync_kick);
|
||||
ImGui::EndGroup();
|
||||
ImGui::SameLine();
|
||||
|
||||
|
Reference in New Issue
Block a user