Rewrite AC bypass (#2430)

* fix(anticheat): rewrite AC bypass again (the old one isn't detected but this is cleaner)
* fix(chat): some chat tweaks
* fix(anticheat): fix memory leak
* feat(lua): add is_player_friend
* fix(protections): fix possible false positives with the vehicle task mismatch protection
* feat(protections): add debug logs to trace false positive
* fix(spam): add some more stuff
This commit is contained in:
maybegreat48
2023-11-19 22:20:15 +00:00
committed by GitHub
parent b9b49790e7
commit 5d538cf53c
18 changed files with 79 additions and 92 deletions

View File

@ -223,13 +223,13 @@ namespace rage
return big::g_pointers->m_gta.m_write_bitbuf_array(this, array, size, 0);
}
void WriteString(char* string, int max_len)
void WriteString(const char* string, int max_len)
{
auto len = std::min(max_len, (int)strlen(string) + 1);
bool extended = len > 127;
Write<bool>(extended, 1);
Write<int>(len, extended ? 15 : 7);
WriteArray(string, 8 * len);
WriteArray((void*)string, 8 * len);
}
bool ReadArray(PVOID array, int size)