From b1e20ab91fac2a3a2c7f14f865f8aeedee8322b1 Mon Sep 17 00:00:00 2001 From: DayibBaba <79384354+DayibBaba@users.noreply.github.com> Date: Sun, 22 May 2022 16:43:09 +0200 Subject: [PATCH] Separated scripts (#233) --- BigBaseV2/src/backend/backend.cpp | 84 ----------------- BigBaseV2/src/backend/backend.hpp | 150 ++++++++++++++++++++++++++++++ BigBaseV2/src/main.cpp | 14 +++ 3 files changed, 164 insertions(+), 84 deletions(-) diff --git a/BigBaseV2/src/backend/backend.cpp b/BigBaseV2/src/backend/backend.cpp index 7b4a7c93..29d08543 100644 --- a/BigBaseV2/src/backend/backend.cpp +++ b/BigBaseV2/src/backend/backend.cpp @@ -20,89 +20,5 @@ namespace big looped::api_login_session(); }); } - - looped::context_menu(); - - QUEUE_JOB_BEGIN_CLAUSE() - { - looped::hud_transition_state(); - }QUEUE_JOB_END_CLAUSE - - QUEUE_JOB_BEGIN_CLAUSE() - { - looped::rgb_synced_fade(); - looped::rgb_synced_spasm(); - }QUEUE_JOB_END_CLAUSE - - QUEUE_JOB_BEGIN_CLAUSE() - { - looped::tunables_disable_phone(); - looped::tunables_no_idle_kick(); - }QUEUE_JOB_END_CLAUSE - - QUEUE_JOB_BEGIN_CLAUSE() - { - looped::self_clean_player(); - looped::self_free_cam(); - looped::self_godmode(); - looped::self_invisibility(); - looped::self_no_ragdoll(); - looped::self_off_radar(); - looped::self_police(); - looped::self_super_run(); - }QUEUE_JOB_END_CLAUSE - - QUEUE_JOB_BEGIN_CLAUSE() - { - looped::session_local_time(); - }QUEUE_JOB_END_CLAUSE - - QUEUE_JOB_BEGIN_CLAUSE() - { - looped::player_never_wanted(); - looped::player_spectate(); - }QUEUE_JOB_END_CLAUSE - - QUEUE_JOB_BEGIN_CLAUSE() - { - looped::self_noclip(); - }QUEUE_JOB_END_CLAUSE - - QUEUE_JOB_BEGIN_CLAUSE() - { - looped::weapons_ammo_special_type(); - looped::weapons_cage_gun(); - looped::weapons_delete_gun(); - looped::weapons_force_crosshairs(); - looped::weapons_gravity_gun(); - looped::weapons_increased_damage(); - looped::weapons_infinite_ammo(); - looped::weapons_infinite_mag(); - looped::weapons_no_recoil(); - looped::weapons_no_spread(); - looped::weapons_repair_gun(); - looped::weapons_steal_vehicle_gun(); - looped::weapons_vehicle_gun(); - }QUEUE_JOB_END_CLAUSE - - QUEUE_JOB_BEGIN_CLAUSE() - { - looped::vehicle_auto_drive(); - looped::vehicle_despawn_bypass(); - looped::vehicle_drive_on_water(); - looped::vehicle_fly(); - looped::vehicle_god_mode(); - looped::vehicle_horn_boost(); - looped::vehicle_instant_brake(); - looped::vehicle_is_targetable(); - looped::vehicle_rainbow_paint(); - looped::vehicle_seatbelt(); - looped::vehicle_speedo_meter(); - }QUEUE_JOB_END_CLAUSE - - QUEUE_JOB_BEGIN_CLAUSE() - { - looped::vehicle_ls_customs(); - }QUEUE_JOB_END_CLAUSE } } diff --git a/BigBaseV2/src/backend/backend.hpp b/BigBaseV2/src/backend/backend.hpp index 3a41540e..1c5db13a 100644 --- a/BigBaseV2/src/backend/backend.hpp +++ b/BigBaseV2/src/backend/backend.hpp @@ -1,10 +1,160 @@ #pragma once #include "common.hpp" +#include "looped/looped.hpp" +#include "script.hpp" namespace big { class backend { public: static void loop(); + + static void self_loop() { + + LOG(INFO) << "Starting script: Self"; + + while (g_running) { + looped::self_clean_player(); + looped::self_free_cam(); + looped::self_godmode(); + looped::self_invisibility(); + looped::self_no_ragdoll(); + looped::self_off_radar(); + looped::self_police(); + looped::self_super_run(); + + script::get_current()->yield(); + } + + + } + static void weapons_loop() { + + LOG(INFO) << "Starting script: Weapons"; + + while (g_running) { + looped::weapons_ammo_special_type(); + looped::weapons_cage_gun(); + looped::weapons_delete_gun(); + looped::weapons_force_crosshairs(); + looped::weapons_gravity_gun(); + looped::weapons_increased_damage(); + looped::weapons_infinite_ammo(); + looped::weapons_infinite_mag(); + looped::weapons_no_recoil(); + looped::weapons_no_spread(); + looped::weapons_repair_gun(); + looped::weapons_steal_vehicle_gun(); + looped::weapons_vehicle_gun(); + + script::get_current()->yield(); + } + + } + static void vehicles_loop() { + + LOG(INFO) << "Starting script: Vehicles"; + + while (g_running) { + looped::vehicle_auto_drive(); + looped::vehicle_despawn_bypass(); + looped::vehicle_drive_on_water(); + looped::vehicle_god_mode(); + looped::vehicle_horn_boost(); + looped::vehicle_instant_brake(); + looped::vehicle_is_targetable(); + looped::vehicle_rainbow_paint(); + looped::vehicle_seatbelt(); + looped::vehicle_speedo_meter(); + + + script::get_current()->yield(); + } + + } + + static void rgbrandomizer_loop() { + + LOG(INFO) << "Starting script: rgbrandomizer"; + + while (g_running) { + + looped::rgb_synced_fade(); + looped::rgb_synced_spasm(); + + script::get_current()->yield(); + } + + } + + static void misc_loop() { + + LOG(INFO) << "Starting script: Miscellaneous"; + + while (g_running) { + + looped::hud_transition_state(); + looped::tunables_disable_phone(); + looped::tunables_no_idle_kick(); + looped::session_local_time(); + + script::get_current()->yield(); + } + + } + + static void remote_loop() { + + LOG(INFO) << "Starting script: Remote"; + + while (g_running) { + + looped::player_never_wanted(); + looped::player_spectate(); + + script::get_current()->yield(); + } + + } + + static void noclip_loop() { + + LOG(INFO) << "Starting script: No clip"; + + while (g_running) { + + looped::self_noclip(); + + script::get_current()->yield(); + } + + } + + static void lscustoms_loop() { + + LOG(INFO) << "Starting script: Ls customs"; + + while (g_running) { + + looped::vehicle_ls_customs(); + + script::get_current()->yield(); + } + + } + + static void vehiclefly_loop() { + + LOG(INFO) << "Starting script: Vehicle fly"; + + while (g_running) { + + looped::vehicle_fly(); + + script::get_current()->yield(); + } + + } + }; } \ No newline at end of file diff --git a/BigBaseV2/src/main.cpp b/BigBaseV2/src/main.cpp index 33ae5bc1..d012054c 100644 --- a/BigBaseV2/src/main.cpp +++ b/BigBaseV2/src/main.cpp @@ -20,6 +20,8 @@ #include "services/vehicle_preview_service.hpp" #include "services/vehicle_service.hpp" +#include "backend/backend.hpp" + BOOL APIENTRY DllMain(HMODULE hmod, DWORD reason, PVOID) { using namespace big; @@ -78,6 +80,18 @@ BOOL APIENTRY DllMain(HMODULE hmod, DWORD reason, PVOID) g_script_mgr.add_script(std::make_unique