From d1b35aab7b7bee4dc4c4393f83fae5b2bb08de79 Mon Sep 17 00:00:00 2001 From: Disquse Date: Mon, 22 Jan 2024 20:30:14 +0300 Subject: [PATCH] fix(playernames/five): gamer tag crew component issue on b3095 Patch an unknown "privilege" check that is not allowing the crew name to be set. --- .../citizen-playernames-five/src/HookGamerInfo.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/code/components/citizen-playernames-five/src/HookGamerInfo.cpp b/code/components/citizen-playernames-five/src/HookGamerInfo.cpp index 424f566e4d..8f37ab753e 100644 --- a/code/components/citizen-playernames-five/src/HookGamerInfo.cpp +++ b/code/components/citizen-playernames-five/src/HookGamerInfo.cpp @@ -186,6 +186,12 @@ struct PatternPair int offset; }; +template +static T Return() +{ + return Value; +} + static HookFunction hookFunction([]() { const size_t gamerInfoSize = (xbr::IsGameBuildOrGreater<2060>()) ? sizeof(CGamerInfo<2060>) : sizeof(CGamerInfo<1604>); @@ -402,6 +408,9 @@ static HookFunction hookFunction([]() { LimitPatch(hook::pattern("83 FB ? 77 ? 48 69 DB").count(1).get(0).get(0)); LimitPatch(hook::pattern("83 FB 33 77 74 48 8B FB").count(1).get(0).get(0)); + + // There's a new unknown "privilege" check that needs to be patched. + hook::jump(hook::get_pattern("84 C0 74 04 32 C0 EB 11 48 8B D6", -0x21), Return); } else {