@@ -49,6 +49,8 @@ void CLuaPedDefs::LoadFunctions()
4949 {" getPedOccupiedVehicleSeat" , GetPedOccupiedVehicleSeat},
5050 {" isPedInVehicle" , IsPedInVehicle},
5151 {" isPedReloadingWeapon" , ArgumentParser<IsPedReloadingWeapon>},
52+ {" isPedEnteringToVehicle" , ArgumentParser<IsPedEnteringToVehicle>},
53+ {" isPedExitingFromVehicle" , ArgumentParser<IsPedExitingFromVehicle>},
5254
5355 // Ped set functions
5456 {" setPedArmor" , ArgumentParserWarn<false , SetPedArmor>},
@@ -120,6 +122,8 @@ void CLuaPedDefs::AddClass(lua_State* luaVM)
120122 lua_classfunction (luaVM, " isHeadless" , " isPedHeadless" );
121123 lua_classfunction (luaVM, " isWearingJetpack" , " isPedWearingJetpack" ); // introduced in 1.5.5-9.13846
122124 lua_classfunction (luaVM, " isReloadingWeapon" , " isPedReloadingWeapon" );
125+ lua_classfunction (luaVM, " isEnteringToVehicle" , " isPedEnteringToVehicle" );
126+ lua_classfunction (luaVM, " isExitingFromVehicle" , " isPedExitingFromVehicle" );
123127
124128 lua_classfunction (luaVM, " getArmor" , " getPedArmor" );
125129 lua_classfunction (luaVM, " getFightingStyle" , " getPedFightingStyle" );
@@ -1555,3 +1559,13 @@ int CLuaPedDefs::TakeAllWeapons(lua_State* luaVM)
15551559 lua_pushboolean (luaVM, false );
15561560 return 1 ;
15571561}
1562+
1563+ bool CLuaPedDefs::IsPedEnteringToVehicle (CPed* const ped) noexcept
1564+ {
1565+ return ped->GetVehicleAction () == CPed::VEHICLEACTION_ENTERING;
1566+ }
1567+
1568+ bool CLuaPedDefs::IsPedExitingFromVehicle (CPed* const ped) noexcept
1569+ {
1570+ return ped->GetVehicleAction () == CPed::VEHICLEACTION_EXITING;
1571+ }
0 commit comments