From e2ab669d184c4c2f3d5a219ba11d5301421cdd25 Mon Sep 17 00:00:00 2001 From: Oleg Trofimov Date: Tue, 29 Oct 2024 22:24:58 +0300 Subject: [PATCH 1/5] ALTV-469 - fix runtime ALTV-469 fixed "i" to "I" ALTV-469 fixed "h" to "H" ALTV-469 changed GetHwidProtHash() to Gethwid3() ALTV-469 Add new method Player_GetHwidProtHash --- c-api/cache/CachedPlayer.h | 6 ++++++ c-api/entities/connection_info.cpp | 4 ++++ c-api/entities/connection_info.h | 1 + c-api/entities/player.cpp | 4 ++++ c-api/entities/player.h | 1 + c-api/func_table.cpp | 6 +++++- cpp-sdk | 2 +- 7 files changed, 22 insertions(+), 2 deletions(-) diff --git a/c-api/cache/CachedPlayer.h b/c-api/cache/CachedPlayer.h index adf2368..93aafc5 100644 --- a/c-api/cache/CachedPlayer.h +++ b/c-api/cache/CachedPlayer.h @@ -57,6 +57,7 @@ namespace cache _socialID(base->GetSocialID()), _hwidHash(base->GetHwidHash()), _hwidExHash(base->GetHwidExHash()), + _hwId3(base->GetHwId3()), _authToken(base->GetAuthToken()), _discordId(base->GetDiscordId()), _invincible(base->GetInvincible()), @@ -327,6 +328,11 @@ namespace cache return _hwidExHash; } + std::string _hwId3; + std::string GetHwId3() const override { + return _hwId3; + } + std::string _authToken; std::string GetAuthToken() const override { return _authToken; diff --git a/c-api/entities/connection_info.cpp b/c-api/entities/connection_info.cpp index 178c530..0a54a00 100644 --- a/c-api/entities/connection_info.cpp +++ b/c-api/entities/connection_info.cpp @@ -37,6 +37,10 @@ uint64_t ConnectionInfo_GetHwIdExHash(alt::IConnectionInfo* connectionInfo) { return connectionInfo->GetHwIdExHash(); } +const char* ConnectionInfo_GetHwId3(alt::IConnectionInfo* connectionInfo, int32_t& size) { + return AllocateString(connectionInfo->GetHwId3(), size); +} + const char* ConnectionInfo_GetAuthToken(alt::IConnectionInfo* connectionInfo, int32_t& size) { return AllocateString(connectionInfo->GetAuthToken(), size); } diff --git a/c-api/entities/connection_info.h b/c-api/entities/connection_info.h index 3c473bc..e2f6825 100644 --- a/c-api/entities/connection_info.h +++ b/c-api/entities/connection_info.h @@ -22,6 +22,7 @@ EXPORT_SERVER uint64_t ConnectionInfo_GetSocialId(alt::IConnectionInfo* connecti EXPORT_SERVER const char* ConnectionInfo_GetSocialName(alt::IConnectionInfo* connectionInfo, int32_t& size); EXPORT_SERVER uint64_t ConnectionInfo_GetHwIdHash(alt::IConnectionInfo* connectionInfo); EXPORT_SERVER uint64_t ConnectionInfo_GetHwIdExHash(alt::IConnectionInfo* connectionInfo); +EXPORT_SERVER const char* ConnectionInfo_GetHwId3(alt::IConnectionInfo* connectionInfo, int32_t& size); EXPORT_SERVER const char* ConnectionInfo_GetAuthToken(alt::IConnectionInfo* connectionInfo, int32_t& size); EXPORT_SERVER uint8_t ConnectionInfo_GetIsDebug(alt::IConnectionInfo* connectionInfo); EXPORT_SERVER const char* ConnectionInfo_GetBranch(alt::IConnectionInfo* connectionInfo, int32_t& size); diff --git a/c-api/entities/player.cpp b/c-api/entities/player.cpp index da0f0a7..d384c41 100644 --- a/c-api/entities/player.cpp +++ b/c-api/entities/player.cpp @@ -246,6 +246,10 @@ uint64_t Player_GetHwidExHash(alt::IPlayer* player) { return player->GetHwidExHash(); } +const char* Player_GetHwId3(alt::IPlayer* player, int32_t& size) { + return AllocateString(player->GetHwId3(), size); +} + const char* Player_GetAuthToken(alt::IPlayer* player, int32_t& size) { return AllocateString(player->GetAuthToken(), size); } diff --git a/c-api/entities/player.h b/c-api/entities/player.h index 23b8b15..f6878c6 100644 --- a/c-api/entities/player.h +++ b/c-api/entities/player.h @@ -77,6 +77,7 @@ EXPORT_SERVER void Player_SetModel(alt::IPlayer* player, uint32_t model); EXPORT_SERVER uint64_t Player_GetSocialID(alt::IPlayer* player); EXPORT_SERVER uint64_t Player_GetHwidHash(alt::IPlayer* player); EXPORT_SERVER uint64_t Player_GetHwidExHash(alt::IPlayer* player); +EXPORT_SERVER const char* Player_GetHwId3(alt::IPlayer* player, int32_t& size); EXPORT_SERVER const char* Player_GetAuthToken(alt::IPlayer* player, int32_t& size); EXPORT_SERVER void Player_SetHealth(alt::IPlayer* player, uint16_t health); diff --git a/c-api/func_table.cpp b/c-api/func_table.cpp index 24ba0c5..42fd060 100644 --- a/c-api/func_table.cpp +++ b/c-api/func_table.cpp @@ -1,6 +1,6 @@ #include "func_table.h" -inline uint64_t capiHash = 10075699596264467259UL; +inline uint64_t capiHash = 17036908327259488488UL; inline uint64_t capiHashes[] = { 0, #ifdef ALT_CLIENT_API @@ -1366,6 +1366,7 @@ inline uint64_t capiHashes[] = { 7415605567391116903UL, 7998061229071288348UL, 4175744399917476392UL, + 11277934694982627403UL, 3151831504154255688UL, 11409383581668438027UL, 8080268107975854795UL, @@ -1525,6 +1526,7 @@ inline uint64_t capiHashes[] = { 12996031514192232278UL, 6875264309357036667UL, 18242810182906526031UL, + 12439246743379924111UL, 424368865670330442UL, 9546723288515311389UL, 16961931856292652951UL, @@ -3183,6 +3185,7 @@ inline void* capiPointers[] = { (void*) ConnectionInfo_GetCloudAuthResult, (void*) ConnectionInfo_GetCloudID, (void*) ConnectionInfo_GetDiscordUserID, + (void*) ConnectionInfo_GetHwId3, (void*) ConnectionInfo_GetHwIdExHash, (void*) ConnectionInfo_GetHwIdHash, (void*) ConnectionInfo_GetID, @@ -3342,6 +3345,7 @@ inline void* capiPointers[] = { (void*) Player_GetHeadBlendData, (void*) Player_GetHeadBlendPaletteColor, (void*) Player_GetHeadOverlay, + (void*) Player_GetHwId3, (void*) Player_GetHwidExHash, (void*) Player_GetHwidHash, (void*) Player_GetInteriorLocation, diff --git a/cpp-sdk b/cpp-sdk index 30b5e35..c2a577d 160000 --- a/cpp-sdk +++ b/cpp-sdk @@ -1 +1 @@ -Subproject commit 30b5e35ab7081f7e8ff7ac2bc0568aa7cf38e6be +Subproject commit c2a577d2b6faa3e365dd794b1293d10fc641b2ac From 2cd1b963413c16f40f0035746805bac798d9d041 Mon Sep 17 00:00:00 2001 From: OlegT Date: Wed, 25 Dec 2024 13:36:48 +0300 Subject: [PATCH 2/5] ALTV-469 Update cpp ref --- cpp-sdk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp-sdk b/cpp-sdk index c2a577d..13acc85 160000 --- a/cpp-sdk +++ b/cpp-sdk @@ -1 +1 @@ -Subproject commit c2a577d2b6faa3e365dd794b1293d10fc641b2ac +Subproject commit 13acc856a06d8af05571338ce70193db03b51826 From e89c6050b21917dc137b745fd171a7794651d37d Mon Sep 17 00:00:00 2001 From: OlegT Date: Wed, 25 Dec 2024 16:02:43 +0300 Subject: [PATCH 3/5] ALTV-469 update cpp refs --- cpp-sdk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp-sdk b/cpp-sdk index 13acc85..437a6d3 160000 --- a/cpp-sdk +++ b/cpp-sdk @@ -1 +1 @@ -Subproject commit 13acc856a06d8af05571338ce70193db03b51826 +Subproject commit 437a6d36578cecbbf0eea5d6491db42752075d49 From 9f567fe22fc1ebd31cc585f81ff9e82c44f648c2 Mon Sep 17 00:00:00 2001 From: OlegT Date: Thu, 26 Dec 2024 14:45:06 +0300 Subject: [PATCH 4/5] ALTV-469 set GetHwId3 to GetHwid3 --- c-api/cache/CachedPlayer.h | 4 ++-- c-api/entities/player.cpp | 4 ++-- c-api/entities/player.h | 2 +- c-api/func_table.cpp | 2 +- cpp-sdk | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/c-api/cache/CachedPlayer.h b/c-api/cache/CachedPlayer.h index 93aafc5..347d60b 100644 --- a/c-api/cache/CachedPlayer.h +++ b/c-api/cache/CachedPlayer.h @@ -57,7 +57,7 @@ namespace cache _socialID(base->GetSocialID()), _hwidHash(base->GetHwidHash()), _hwidExHash(base->GetHwidExHash()), - _hwId3(base->GetHwId3()), + _hwId3(base->GetHwid3()), _authToken(base->GetAuthToken()), _discordId(base->GetDiscordId()), _invincible(base->GetInvincible()), @@ -329,7 +329,7 @@ namespace cache } std::string _hwId3; - std::string GetHwId3() const override { + std::string GetHwid3() const override { return _hwId3; } diff --git a/c-api/entities/player.cpp b/c-api/entities/player.cpp index d384c41..1f7b0c6 100644 --- a/c-api/entities/player.cpp +++ b/c-api/entities/player.cpp @@ -246,8 +246,8 @@ uint64_t Player_GetHwidExHash(alt::IPlayer* player) { return player->GetHwidExHash(); } -const char* Player_GetHwId3(alt::IPlayer* player, int32_t& size) { - return AllocateString(player->GetHwId3(), size); +const char* Player_GetHwid3(alt::IPlayer* player, int32_t& size) { + return AllocateString(player->GetHwid3(), size); } const char* Player_GetAuthToken(alt::IPlayer* player, int32_t& size) { diff --git a/c-api/entities/player.h b/c-api/entities/player.h index f6878c6..8c72082 100644 --- a/c-api/entities/player.h +++ b/c-api/entities/player.h @@ -77,7 +77,7 @@ EXPORT_SERVER void Player_SetModel(alt::IPlayer* player, uint32_t model); EXPORT_SERVER uint64_t Player_GetSocialID(alt::IPlayer* player); EXPORT_SERVER uint64_t Player_GetHwidHash(alt::IPlayer* player); EXPORT_SERVER uint64_t Player_GetHwidExHash(alt::IPlayer* player); -EXPORT_SERVER const char* Player_GetHwId3(alt::IPlayer* player, int32_t& size); +EXPORT_SERVER const char* Player_GetHwid3(alt::IPlayer* player, int32_t& size); EXPORT_SERVER const char* Player_GetAuthToken(alt::IPlayer* player, int32_t& size); EXPORT_SERVER void Player_SetHealth(alt::IPlayer* player, uint16_t health); diff --git a/c-api/func_table.cpp b/c-api/func_table.cpp index 42fd060..06d966a 100644 --- a/c-api/func_table.cpp +++ b/c-api/func_table.cpp @@ -3345,7 +3345,7 @@ inline void* capiPointers[] = { (void*) Player_GetHeadBlendData, (void*) Player_GetHeadBlendPaletteColor, (void*) Player_GetHeadOverlay, - (void*) Player_GetHwId3, + (void*) Player_GetHwid3, (void*) Player_GetHwidExHash, (void*) Player_GetHwidHash, (void*) Player_GetInteriorLocation, diff --git a/cpp-sdk b/cpp-sdk index 437a6d3..bbae9aa 160000 --- a/cpp-sdk +++ b/cpp-sdk @@ -1 +1 @@ -Subproject commit 437a6d36578cecbbf0eea5d6491db42752075d49 +Subproject commit bbae9aaa2e9ec8de05c65b335f361089b70b1a2b From 21278f175f80604e3785fbaa2d85f0dcfdbf6b19 Mon Sep 17 00:00:00 2001 From: Till Schreiber Date: Thu, 26 Dec 2024 13:37:23 +0100 Subject: [PATCH 5/5] ALTV-469 update sdk and connection_info --- c-api/entities/connection_info.cpp | 4 ++-- c-api/entities/connection_info.h | 2 +- c-api/func_table.cpp | 8 ++++---- cpp-sdk | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/c-api/entities/connection_info.cpp b/c-api/entities/connection_info.cpp index 0a54a00..0844901 100644 --- a/c-api/entities/connection_info.cpp +++ b/c-api/entities/connection_info.cpp @@ -37,8 +37,8 @@ uint64_t ConnectionInfo_GetHwIdExHash(alt::IConnectionInfo* connectionInfo) { return connectionInfo->GetHwIdExHash(); } -const char* ConnectionInfo_GetHwId3(alt::IConnectionInfo* connectionInfo, int32_t& size) { - return AllocateString(connectionInfo->GetHwId3(), size); +const char* ConnectionInfo_GetHwid3(alt::IConnectionInfo* connectionInfo, int32_t& size) { + return AllocateString(connectionInfo->GetHwid3(), size); } const char* ConnectionInfo_GetAuthToken(alt::IConnectionInfo* connectionInfo, int32_t& size) { diff --git a/c-api/entities/connection_info.h b/c-api/entities/connection_info.h index e2f6825..68de0db 100644 --- a/c-api/entities/connection_info.h +++ b/c-api/entities/connection_info.h @@ -22,7 +22,7 @@ EXPORT_SERVER uint64_t ConnectionInfo_GetSocialId(alt::IConnectionInfo* connecti EXPORT_SERVER const char* ConnectionInfo_GetSocialName(alt::IConnectionInfo* connectionInfo, int32_t& size); EXPORT_SERVER uint64_t ConnectionInfo_GetHwIdHash(alt::IConnectionInfo* connectionInfo); EXPORT_SERVER uint64_t ConnectionInfo_GetHwIdExHash(alt::IConnectionInfo* connectionInfo); -EXPORT_SERVER const char* ConnectionInfo_GetHwId3(alt::IConnectionInfo* connectionInfo, int32_t& size); +EXPORT_SERVER const char* ConnectionInfo_GetHwid3(alt::IConnectionInfo* connectionInfo, int32_t& size); EXPORT_SERVER const char* ConnectionInfo_GetAuthToken(alt::IConnectionInfo* connectionInfo, int32_t& size); EXPORT_SERVER uint8_t ConnectionInfo_GetIsDebug(alt::IConnectionInfo* connectionInfo); EXPORT_SERVER const char* ConnectionInfo_GetBranch(alt::IConnectionInfo* connectionInfo, int32_t& size); diff --git a/c-api/func_table.cpp b/c-api/func_table.cpp index 06d966a..acd7d81 100644 --- a/c-api/func_table.cpp +++ b/c-api/func_table.cpp @@ -1,6 +1,6 @@ #include "func_table.h" -inline uint64_t capiHash = 17036908327259488488UL; +inline uint64_t capiHash = 2737407539021183714UL; inline uint64_t capiHashes[] = { 0, #ifdef ALT_CLIENT_API @@ -1366,7 +1366,7 @@ inline uint64_t capiHashes[] = { 7415605567391116903UL, 7998061229071288348UL, 4175744399917476392UL, - 11277934694982627403UL, + 3230557606089997547UL, 3151831504154255688UL, 11409383581668438027UL, 8080268107975854795UL, @@ -1526,7 +1526,7 @@ inline uint64_t capiHashes[] = { 12996031514192232278UL, 6875264309357036667UL, 18242810182906526031UL, - 12439246743379924111UL, + 13686597780873033455UL, 424368865670330442UL, 9546723288515311389UL, 16961931856292652951UL, @@ -3185,7 +3185,7 @@ inline void* capiPointers[] = { (void*) ConnectionInfo_GetCloudAuthResult, (void*) ConnectionInfo_GetCloudID, (void*) ConnectionInfo_GetDiscordUserID, - (void*) ConnectionInfo_GetHwId3, + (void*) ConnectionInfo_GetHwid3, (void*) ConnectionInfo_GetHwIdExHash, (void*) ConnectionInfo_GetHwIdHash, (void*) ConnectionInfo_GetID, diff --git a/cpp-sdk b/cpp-sdk index bbae9aa..5507727 160000 --- a/cpp-sdk +++ b/cpp-sdk @@ -1 +1 @@ -Subproject commit bbae9aaa2e9ec8de05c65b335f361089b70b1a2b +Subproject commit 5507727239d5665e75828a7bec3f44bff245f3c8