-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy paththread.cpp
More file actions
23 lines (16 loc) · 969 Bytes
/
thread.cpp
File metadata and controls
23 lines (16 loc) · 969 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "thread.hpp"
#include "fiber.hpp"
#include "src/fivem/classes/classes.hpp"
void Thread::CallT(game_thread* this_ptr, int ops_to_execute) {
//if (this_ptr->m_context.m_script_hash == 0x26FB4AB9 || this_ptr->m_context.m_script_hash == 1104607124 || this_ptr->m_context.m_script_hash == 3381724246)
if (this_ptr->m_context.m_script_hash == STARTUP || this_ptr->m_context.m_script_hash == MAIN_PERSISTENT || this_ptr->m_context.m_script_hash == 0x3) //0xe6b4a2e
{
//Log::Msg("[+] name: %s || id: %d || script hash: %llx || opsto_execute %llx", this_ptr->m_name, this_ptr->m_context.m_thread_id, this_ptr->m_context.m_script_hash, ops_to_execute);
//Log::Msg("[+] script id: %llx || opsto_execute %llx", this_ptr->m_context.m_thread_id, ops_to_execute);
auto& thread = game_thread::GetActiveThread(fivem::activeThreadTlsOffset);
auto orig_thread = thread;
thread = this_ptr;
Fiber::Instance().GameFiber->on_tick();
thread = orig_thread;
}
}