Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ALTV-640 add parachuteStateChange event #280

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions client/src/events/PlayerEvent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,11 @@ static js::Event playerWeaponChangeEvent(alt::CEvent::Type::PLAYER_WEAPON_CHANGE
args.Set("oldWeapon", e->GetOldWeapon());
args.Set("newWeapon", e->GetNewWeapon());
});

static js::Event parachuteStateChange(alt::CEvent::Type::PARACHUTE_STATE_CHANGE, [](const alt::CEvent* ev, js::Event::EventArgs& args)
{
auto e = static_cast<const alt::CParachuteStateChangeEvent*>(ev);
args.Set("player", e->GetPlayer());
args.Set("oldState", e->GetOldState());
args.Set("newState", e->GetNewState());
});
2 changes: 1 addition & 1 deletion deps/cpp-sdk
3 changes: 3 additions & 0 deletions shared/src/namespaces/EnumsNamespace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,7 @@ extern js::Namespace enumsNamespace("Enums", [](js::NamespaceTemplate& tpl) {
tpl.StaticEnum<alt::CloudAuthResult>("CloudAuthResult");
tpl.StaticEnum<alt::Benefit>("Benefit");
tpl.StaticEnum<alt::ITextLabel::Alignment>("TextLabelAlignment");
#ifdef ALT_CLIENT_API
tpl.StaticEnum<alt::CParachuteStateChangeEvent::ParachuteState>("ParachuteState");
#endif
});