Skip to content

Commit

Permalink
Altv 641 (#165)
Browse files Browse the repository at this point in the history
* ALTV-641 - add IsOnVehicle() getter

* ALTV-641 - update sdk
  • Loading branch information
Doxoh authored Jan 16, 2025
1 parent d84e3c5 commit c3930cc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
5 changes: 5 additions & 0 deletions c-api/entities/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,11 @@ void Player_RemoveHeadBlendPaletteColor(alt::IPlayer* player)
player->RemoveHeadBlendPaletteColor();
}

uint8_t Player_IsOnVehicle(alt::IPlayer* player)
{
return player->IsOnVehicle();
}

#endif

#if ALT_CLIENT_API
Expand Down
4 changes: 3 additions & 1 deletion c-api/entities/player.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,4 +262,6 @@ EXPORT_CLIENT const char* Player_GetTaskData(alt::IPlayer* player, int32_t& size
EXPORT_SERVER const char* Player_GetBloodDamageBase64(alt::IPlayer* player, int32_t& size);
EXPORT_SERVER void Player_SetBloodDamageBase64(alt::IPlayer* player, const char* bloodDamage);

EXPORT_SERVER void Player_RemoveHeadBlendPaletteColor(alt::IPlayer* player);
EXPORT_SERVER void Player_RemoveHeadBlendPaletteColor(alt::IPlayer* player);

EXPORT_SERVER uint8_t Player_IsOnVehicle(alt::IPlayer* player);
4 changes: 3 additions & 1 deletion c-api/func_table.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "func_table.h"

inline uint64_t capiHash = 9157281768489972218UL;
inline uint64_t capiHash = 14533172368099836198UL;
inline uint64_t capiHashes[] = {
0,
#ifdef ALT_CLIENT_API
Expand Down Expand Up @@ -1553,6 +1553,7 @@ inline uint64_t capiHashes[] = {
14630872318254829849UL,
4495638180817996194UL,
11351828541605651622UL,
4450913768369030272UL,
13440527787182826435UL,
6165254230688543493UL,
1188245696791696101UL,
Expand Down Expand Up @@ -3374,6 +3375,7 @@ inline void* capiPointers[] = {
(void*) Player_IsCrouching,
(void*) Player_IsEntityInStreamingRange,
(void*) Player_IsNetworkOwnershipDisabled,
(void*) Player_IsOnVehicle,
(void*) Player_IsStealthy,
(void*) Player_IsSuperJumpEnabled,
(void*) Player_Kick,
Expand Down
2 changes: 1 addition & 1 deletion cpp-sdk
Submodule cpp-sdk updated 1 files
+2 −0 objects/IPlayer.h

0 comments on commit c3930cc

Please sign in to comment.