diff --git a/c-api/cache/CachedPlayer.h b/c-api/cache/CachedPlayer.h index d83d3ab..93aafc5 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,9 @@ namespace cache } std::string _hwId3; - std::string GetHwId3() const override { return _hwId3; } + std::string GetHwId3() const override { + return _hwId3; + } std::string _authToken; std::string GetAuthToken() const override { diff --git a/c-api/entities/connection_info.cpp b/c-api/entities/connection_info.cpp index e2d29d9..0a54a00 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(); } -std::string ConnectionInfo_GetHwId3(alt::IConnectionInfo* connectionInfo) { - return connectionInfo->GetHwId3(); +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 07ccb2d..e2f6825 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); +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 2c5fe11..d384c41 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(); } -std::string Player_GetHwId3(alt::IPlayer* player) { - return player->GetHwId3(); +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 13049b0..f6878c6 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); +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 9d33e42..975e09a 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 = 11629663074568386340UL; +inline uint64_t capiHash = 17036908327259488488UL; inline uint64_t capiHashes[] = { 0, #ifdef ALT_CLIENT_API @@ -1336,6 +1336,7 @@ inline uint64_t capiHashes[] = { 7415605567391116903UL, 7998061229071288348UL, 4175744399917476392UL, + 11277934694982627403UL, 3151831504154255688UL, 11409383581668438027UL, 8080268107975854795UL, @@ -1495,6 +1496,7 @@ inline uint64_t capiHashes[] = { 12996031514192232278UL, 6875264309357036667UL, 18242810182906526031UL, + 12439246743379924111UL, 424368865670330442UL, 9546723288515311389UL, 16961931856292652951UL, @@ -3123,8 +3125,8 @@ inline void* capiPointers[] = { (void*) ConnectionInfo_GetCloudAuthResult, (void*) ConnectionInfo_GetCloudID, (void*) ConnectionInfo_GetDiscordUserID, - (void*) ConnectionInfo_GetHwIdExHash, (void*) ConnectionInfo_GetHwId3, + (void*) ConnectionInfo_GetHwIdExHash, (void*) ConnectionInfo_GetHwIdHash, (void*) ConnectionInfo_GetID, (void*) ConnectionInfo_GetIp, @@ -3283,8 +3285,8 @@ inline void* capiPointers[] = { (void*) Player_GetHeadBlendData, (void*) Player_GetHeadBlendPaletteColor, (void*) Player_GetHeadOverlay, - (void*) Player_GetHwidExHash, (void*) Player_GetHwId3, + (void*) Player_GetHwidExHash, (void*) Player_GetHwidHash, (void*) Player_GetInteriorLocation, (void*) Player_GetInvincible,