Fixed TRIGGER_SCRIPT_EVENT for 3095. (#2527)

This commit is contained in:
gir489 2023-12-13 13:32:26 -05:00 committed by GitHub
parent cb5f01567c
commit b7b901d77f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 31 additions and 31 deletions

View File

@ -3,7 +3,7 @@ include(FetchContent)
FetchContent_Declare(
gtav_classes
GIT_REPOSITORY https://github.com/Yimura/GTAV-Classes.git
GIT_TAG e52b8c65379f3304cf7b72dc87561c9d3924d4b4
GIT_TAG 08cc88c83a988f1acfd90f89fa336ba548146831
GIT_PROGRESS TRUE
CONFIGURE_COMMAND ""
BUILD_COMMAND ""

View File

@ -26,7 +26,7 @@ namespace big
(int64_t)self::id,
scr_globals::gpbd_fm_3.as<GPBD_FM_3*>()->Entries[player->id()].ScriptEventReplayProtectionCounter};
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id());
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id(), (int)eRemoteEvent::NetworkBail);
}
};

View File

@ -21,7 +21,7 @@ namespace big
const size_t arg_count = 15;
int64_t args[arg_count] = {(int64_t)eRemoteEvent::InteriorControl, (int64_t)self::id, (int64_t)(int)-1};
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id());
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id(), (int)eRemoteEvent::InteriorControl);
}
};

View File

@ -29,7 +29,7 @@ namespace big
0,
1};
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << self::id);
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << self::id, (int)eRemoteEvent::Teleport);
}
else if (scr_globals::globalplayer_bd.as<GlobalPlayerBD*>()->Entries[id].SimpleInteriorData.Index != eSimpleInteriorIndex::SIMPLE_INTERIOR_INVALID)
{

View File

@ -28,7 +28,7 @@ namespace big
const size_t arg_count = 2;
int64_t args[arg_count] = {(int64_t)eRemoteEvent::CeoKick, (int64_t)self::id};
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id());
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id(), (int)eRemoteEvent::CeoKick);
return;
}
else
@ -37,7 +37,7 @@ namespace big
const size_t arg_count = 3;
int64_t args[arg_count] = {(int64_t)eRemoteEvent::MarkPlayerAsBeast, (int64_t)self::id, leader};
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id());
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id(), (int)eRemoteEvent::MarkPlayerAsBeast);
}
}
};

View File

@ -19,7 +19,7 @@ namespace big
const size_t arg_count = 3;
int64_t args[arg_count] = {(int64_t)eRemoteEvent::ForceMission, (int64_t)self::id, 0};
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id());
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id(), (int)eRemoteEvent::ForceMission);
}
};

View File

@ -56,7 +56,7 @@ namespace big
.SimpleInteriorData.InstanceId,
};
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id());
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id(), (int)eRemoteEvent::KickFromInterior);
}
}
};

View File

@ -24,7 +24,7 @@ namespace big
const size_t arg_count = 9;
int64_t args[arg_count] = {(int64_t)eRemoteEvent::VehicleKick, self::id, 0, 0, 0, 0, 0, 0, 0};
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id());
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id(), (int)eRemoteEvent::VehicleKick);
}
else
{

View File

@ -23,7 +23,7 @@ namespace big
strcpy((char*)&args[2], "HUD_ROSBANPERM");
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id());
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id(), (int)eRemoteEvent::SendTextLabelSMS);
}
};

View File

@ -28,7 +28,7 @@ namespace big
strcpy((char*)&args[2],
(std::string("SXT_") + strippers[rand() % strippers.size()] + "_" + sext_types[rand() % sext_types.size()])
.data());
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id());
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id(), (int)eRemoteEvent::SendTextLabelSMS);
}
};

View File

@ -19,7 +19,7 @@ namespace big
const size_t arg_count = 9;
int64_t args[arg_count] = {(int64_t)eRemoteEvent::Teleport, self::id, (int64_t)player->id(), (int64_t)(int)-1, 1, (int64_t)_args.get<int64_t>(0), 1, 1, 1};
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id());
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id(), (int)eRemoteEvent::Teleport);
}
};

View File

@ -34,7 +34,7 @@ namespace big
(int64_t) true,
-1};
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id());
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id(), (int)eRemoteEvent::InteriorControl);
}
};

View File

@ -19,7 +19,7 @@ namespace big
const size_t arg_count = 6;
int64_t args[arg_count] = {(int64_t)eRemoteEvent::TeleportToWarehouse, self::id, (int64_t)player->id(), 1, (int64_t)_args.get<int>(0)};
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id());
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id(), (int)eRemoteEvent::TeleportToWarehouse);
}
};

View File

@ -28,7 +28,7 @@ namespace big
*scr_globals::gsbd_fm_events.at(9).as<int*>(),
*scr_globals::gsbd_fm_events.at(10).as<int*>()};
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id());
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id(), (int)eRemoteEvent::TransactionError);
}
};

View File

@ -30,14 +30,14 @@ namespace big
args[2 + 19] = arg19;
args[24] = scr_globals::gpbd_fm_3.as<GPBD_FM_3*>()->Entries[player->id()].ScriptEventReplayProtectionCounter;
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id());
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id(), (int)eRemoteEvent::StartScriptBegin);
for (int i = 0; i < 2; i++)
{
const size_t arg_count_2 = 25;
int64_t args_2[arg_count_2] = {(int64_t)eRemoteEvent::StartScriptProceed, (int64_t)self::id};
args_2[2 + 17] = 1337;
g_pointers->m_gta.m_trigger_script_event(1, args_2, arg_count_2, 1 << player->id());
g_pointers->m_gta.m_trigger_script_event(1, args_2, arg_count_2, 1 << player->id(), (int)eRemoteEvent::StartScriptProceed);
script::get_current()->yield(20ms);
}

View File

@ -18,7 +18,7 @@ namespace big
const size_t arg_count = 3;
int64_t args[arg_count] = {(int64_t)eRemoteEvent::TriggerCEORaid, (int64_t)self::id, 0};
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id());
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << player->id(), (int)eRemoteEvent::TriggerCEORaid);
}
};

View File

@ -55,7 +55,7 @@ namespace big
const size_t arg_count = 3;
int64_t args[arg_count] = {(int64_t)eRemoteEvent::TSECommand, (int64_t)self::id, (int64_t)eRemoteEvent::TSECommandRotateCam};
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, rotate_cam_bits);
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, rotate_cam_bits, (int)eRemoteEvent::TSECommand);
}
});
}

View File

@ -91,7 +91,7 @@ namespace big
{0x936E6168A9BCEDB5, 0x5E3ED023C0E7CC7C},
{0xD8F66A3A60C62153, 0x4BC3E5D2FB0A1665},
{0x2902843FCD2B2D79, 0xFCEF367B86651ED3},
{0x5AE99C571D5BBE5D, 0x2C0E0814582947D3},
{0x5AE99C571D5BBE5D, 0x71A6F836422FDD2B},
{0x078EBE9809CCD637, 0xCD17096A98584C2B},
{0x5262CC1995D07E09, 0x6FF322107B12B749},
{0x18C1270EA7F199BC, 0x828F3FAE99DA791A},

View File

@ -56,7 +56,7 @@ namespace big::functions
using get_net_game_player = CNetGamePlayer* (*)(Player player);
using trigger_script_event = void (*)(int event_group, int64_t* args, int arg_count, int player_bits);
using trigger_script_event = void (*)(int event_group, int64_t* args, int arg_count, int player_bits, int event_id);
using increment_stat_event = bool (*)(uint64_t net_event_struct, int64_t sender, int64_t a3);

View File

@ -34,7 +34,7 @@ namespace lua::network
for (auto arg : args)
actual_args.push_back((uint32_t)arg);
big::g_pointers->m_gta.m_trigger_script_event(1, actual_args.data(), actual_args.size(), bitset);
big::g_pointers->m_gta.m_trigger_script_event(1, actual_args.data(), actual_args.size(), bitset, args[0]);
}
// Lua API: Function

View File

@ -202,7 +202,7 @@ namespace big
// Trigger Script Event
{
"TSE",
"84 C9 0F 84 ? ? ? ? 48 89 5C 24 ? 48 89 74 24",
"48 8B C4 48 89 58 08 44 89 48 20 55 56 57 48 83 EC 30",
[](memory::handle ptr)
{
g_pointers->m_gta.m_trigger_script_event = ptr.as<decltype(gta_pointers::m_trigger_script_event)>();

View File

@ -64,14 +64,14 @@ namespace big
args[2 + 17] = 1337;
args[24] = scr_globals::gpbd_fm_3.as<GPBD_FM_3*>()->Entries[m_target->get()->id()].ScriptEventReplayProtectionCounter;
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << m_target->get()->id());
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << m_target->get()->id(), (int)eRemoteEvent::StartScriptBegin);
for (int i = 0; i < 2; i++)
{
const size_t arg_count_2 = 25;
int64_t args_2[arg_count_2] = {(int64_t)eRemoteEvent::StartScriptProceed, (int64_t)self::id};
args_2[2 + 17] = 1337;
g_pointers->m_gta.m_trigger_script_event(1, args_2, arg_count_2, 1 << m_target->get()->id());
g_pointers->m_gta.m_trigger_script_event(1, args_2, arg_count_2, 1 << m_target->get()->id(), (int)eRemoteEvent::StartScriptProceed);
script::get_current()->yield(20ms);
}

View File

@ -16,7 +16,7 @@ namespace big::globals
self::id,
(int64_t)scr_globals::gpbd_fm_3.as<GPBD_FM_3*>()->Entries[target].ScriptEventReplayProtectionCounter};
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << target);
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << target, (int)eRemoteEvent::ClearWantedLevel);
}
inline void give_remote_otr(Player target)
@ -30,7 +30,7 @@ namespace big::globals
false,
(int64_t)scr_globals::gpbd_fm_3.as<GPBD_FM_3*>()->Entries[target].ScriptEventReplayProtectionCounter};
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << target);
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << target, (int)eRemoteEvent::RemoteOffradar);
}
inline Interior get_interior_from_player(Player player)

View File

@ -222,6 +222,6 @@ namespace big::session
0 // bParam3
};
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << target);
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << target, (int)eRemoteEvent::GiveCollectible);
}
}

View File

@ -48,7 +48,7 @@ namespace big::toxic
const size_t arg_count = 4;
int64_t args[arg_count] = {(int64_t)eRemoteEvent::StartActivity, (int64_t)self::id, (int64_t)type, (int64_t) true};
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << target->id());
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, 1 << target->id(), (int)eRemoteEvent::StartActivity);
}
inline bool set_time(player_ptr target, uint32_t millis)

View File

@ -33,7 +33,7 @@ namespace big::troll
*scr_globals::gsbd_fm_events.at(9).as<int*>(),
*scr_globals::gsbd_fm_events.at(10).as<int*>()};
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, -1);
g_pointers->m_gta.m_trigger_script_event(1, args, arg_count, -1, (int)eRemoteEvent::Bounty);
}
}

View File

@ -56,7 +56,7 @@ namespace big
components::button("DEBUG_SCRIPT_EVENT_SEND_EVENT"_T, [] {
args[1] = self::id;// prevent detection from AC
g_pointers->m_gta.m_trigger_script_event(1, args, event_arg_count, event_everyone ? -1 : 1 << event_player_bits);
g_pointers->m_gta.m_trigger_script_event(1, args, event_arg_count, event_everyone ? -1 : 1 << event_player_bits, args[0]);
});
ImGui::EndTabItem();