Skip to content

Commit

Permalink
update cpp sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
xxshady committed Jun 10, 2023
1 parent 098ab30 commit ab6586a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion altv_sdk/cpp-sdk
2 changes: 1 addition & 1 deletion altv_sdk/cpp-sdk-version.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#pragma once

#define ALT_SDK_VERSION "8345006"
#define ALT_SDK_VERSION "a5f8a4f"
3 changes: 3 additions & 0 deletions altv_sdk/src/alt_classes/CWeaponDamageEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ Vector3Wrapper GetShotOffset(const alt::CWeaponDamageEvent* ptr) {
WeaponDamageEventBodyPart GetBodyPart(const alt::CWeaponDamageEvent* ptr) {
return static_cast<int8_t>(ptr->GetBodyPart());
}
alt::IEntity* GetSourceEntity(const alt::CWeaponDamageEvent* ptr) {
return ptr->GetSourceEntity();
}
void SetDamageValue(alt::CWeaponDamageEvent* ptr, u32 _damageValue) {
return ptr->SetDamageValue(_damageValue);
}
Expand Down
2 changes: 2 additions & 0 deletions core_resource/src/events/sdk_contexts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ impl ConsoleCommandEvent {
#[derive(Debug)]
pub struct WeaponDamageEvent {
pub source: player::PlayerContainer,
pub source_entity: Option<AnyEntity>,
pub target: AnyEntity,
pub weapon_hash: Hash,
pub body_part: altv_sdk::PlayerBodyPart,
Expand All @@ -210,6 +211,7 @@ impl WeaponDamageEvent {

Self {
source: get_non_null_player(sdk::CWeaponDamageEvent::GetSource(weapon_event), resource),
source_entity: get_entity_by_ptr(sdk::CWeaponDamageEvent::GetSourceEntity(weapon_event), resource),
target: get_non_null_entity_by_ptr(
sdk::CWeaponDamageEvent::GetTarget(weapon_event),
resource,
Expand Down

0 comments on commit ab6586a

Please sign in to comment.