@@ -63,6 +63,7 @@ void CLuaPedDefs::LoadFunctions()
6363 {" setPedExitVehicle" , ArgumentParser<SetPedExitVehicle>},
6464 {" setPedBleeding" , ArgumentParser<SetPedBleeding>},
6565 {" playPedVoiceLine" , ArgumentParser<PlayPedVoiceLine>},
66+ {" setPedWearingJetpack" , ArgumentParser<SetPedWearingJetpack>},
6667
6768 {" getPedVoice" , GetPedVoice},
6869 {" getElementBonePosition" , ArgumentParserWarn<false , GetElementBonePosition>},
@@ -213,6 +214,7 @@ void CLuaPedDefs::AddClass(lua_State* luaVM)
213214 lua_classfunction (luaVM, " setExitVehicle" , " setPedExitVehicle" );
214215 lua_classfunction (luaVM, " setBleeding" , " setPedBleeding" );
215216 lua_classfunction (luaVM, " playVoiceLine" , " playPedVoiceLine" );
217+ lua_classfunction (luaVM, " setWearingJetpack" , " setPedWearingJetpack" );
216218
217219 lua_classvariable (luaVM, " vehicle" , OOP_WarpPedIntoVehicle, GetPedOccupiedVehicle);
218220 lua_classvariable (luaVM, " vehicleSeat" , NULL , " getPedOccupiedVehicleSeat" );
@@ -2560,3 +2562,11 @@ void CLuaPedDefs::PlayPedVoiceLine(CClientPed* ped, int speechId, std::optional<
25602562
25612563 ped->Say (speechContextId, probability.value_or (1 .0f ));
25622564}
2565+
2566+ bool CLuaPedDefs::SetPedWearingJetpack (CClientPed* ped, bool state)
2567+ {
2568+ if (!ped->IsLocalEntity ())
2569+ return false ;
2570+
2571+ return ped->SetHasJetPack (state);
2572+ }
0 commit comments