#include "gta6_framework.h" #include class HeistSyncModule : public GTA6::ScriptModule { public: void OnProtagonistSwitch(GTA6::CharacterId from, GTA6::CharacterId to) override { std::cout << "Switching detected in Leonida State Engine..." << std::endl; auto luciaInventory = GTA6::GetInventory(GTA6::CharacterId::LUCIA); auto jasonInventory = GTA6::GetInventory(GTA6::CharacterId::JASON); // Synchronize shared crypto-wallets and illegal laundered cash bags double sharedPool = luciaInventory->GetCryptoBalance() + jasonInventory->GetCryptoBalance(); LOG_INFO("Total synchronized crew funds: $" + std::to_string(sharedPool)); } }; // Registering the module to the GTA6 Core Native Framework REGISTER_MODULE(HeistSyncModule);