From b28b1628dd3c43b0d39576c34f81d6928ec8e038 Mon Sep 17 00:00:00 2001 From: MegadreamsBE Date: Wed, 27 Aug 2025 21:33:16 -0400 Subject: [PATCH 1/3] Fix client-side peds not being able to enter/exit local vehicles --- Client/mods/deathmatch/logic/CClientPed.cpp | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/Client/mods/deathmatch/logic/CClientPed.cpp b/Client/mods/deathmatch/logic/CClientPed.cpp index eac1210a6bd..9893a060184 100644 --- a/Client/mods/deathmatch/logic/CClientPed.cpp +++ b/Client/mods/deathmatch/logic/CClientPed.cpp @@ -6532,13 +6532,6 @@ bool CClientPed::EnterVehicle(CClientVehicle* pVehicle, bool bPassenger) return false; } - // Are we a clientside ped - // TODO: Add support for clientside peds - if (IsLocalEntity()) - { - return false; - } - // Are we already inside a vehicle if (GetOccupiedVehicle()) { @@ -6750,13 +6743,6 @@ bool CClientPed::ExitVehicle() return false; } - // Are we a clientside ped - // TODO: Add support for clientside peds - if (IsLocalEntity()) - { - return false; - } - // Get our occupied vehicle CClientVehicle* pOccupiedVehicle = GetOccupiedVehicle(); if (!pOccupiedVehicle) From fb26fe24d25bc124f9263e4f9a1910a66e2d4200 Mon Sep 17 00:00:00 2001 From: MegadreamsBE Date: Wed, 27 Aug 2025 23:05:24 -0400 Subject: [PATCH 2/3] Add setPedWearingJetpack client-side --- Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.cpp | 10 ++++++++++ Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.cpp b/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.cpp index 68b707d14b3..59c6d06b609 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.cpp +++ b/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.cpp @@ -63,6 +63,7 @@ void CLuaPedDefs::LoadFunctions() {"setPedExitVehicle", ArgumentParser}, {"setPedBleeding", ArgumentParser}, {"playPedVoiceLine", ArgumentParser}, + {"setPedWearingJetpack", ArgumentParser}, {"getPedVoice", GetPedVoice}, {"getElementBonePosition", ArgumentParserWarn}, @@ -213,6 +214,7 @@ void CLuaPedDefs::AddClass(lua_State* luaVM) lua_classfunction(luaVM, "setExitVehicle", "setPedExitVehicle"); lua_classfunction(luaVM, "setBleeding", "setPedBleeding"); lua_classfunction(luaVM, "playVoiceLine", "playPedVoiceLine"); + lua_classfunction(luaVM, "setWearingJetpack", "setPedWearingJetpack"); lua_classvariable(luaVM, "vehicle", OOP_WarpPedIntoVehicle, GetPedOccupiedVehicle); lua_classvariable(luaVM, "vehicleSeat", NULL, "getPedOccupiedVehicleSeat"); @@ -2560,3 +2562,11 @@ void CLuaPedDefs::PlayPedVoiceLine(CClientPed* ped, int speechId, std::optional< ped->Say(speechContextId, probability.value_or(1.0f)); } + +bool CLuaPedDefs::SetPedWearingJetpack(CClientPed* ped, bool state) +{ + if (!ped->IsLocalEntity()) + return false; + + return ped->SetHasJetPack(state); +} diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.h b/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.h index 20ec1aa5909..c1b51401ab4 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.h +++ b/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.h @@ -120,4 +120,6 @@ class CLuaPedDefs : public CLuaDefs static bool killPedTask(CClientPed* ped, taskType taskType, std::uint8_t taskNumber, std::optional gracefully); static void PlayPedVoiceLine(CClientPed* ped, int speechId, std::optional probability); + + static bool SetPedWearingJetpack(CClientPed* ped, bool state); }; From e18219bd4a6b8d9132d031e51820bfa386d7a5aa Mon Sep 17 00:00:00 2001 From: MegadreamsBE Date: Tue, 6 Jan 2026 19:38:27 -0500 Subject: [PATCH 3/3] Add missing client-side jetpack variable logic --- Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.cpp b/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.cpp index db2afe5e406..ddf624b3cf8 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.cpp +++ b/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.cpp @@ -220,7 +220,7 @@ void CLuaPedDefs::AddClass(lua_State* luaVM) lua_classvariable(luaVM, "vehicleSeat", NULL, "getPedOccupiedVehicleSeat"); lua_classvariable(luaVM, "canBeKnockedOffBike", "setPedCanBeKnockedOffBike", "canPedBeKnockedOffBike"); lua_classvariable(luaVM, "hasJetPack", NULL, "doesPedHaveJetPack"); - lua_classvariable(luaVM, "jetpack", NULL, "isPedWearingJetpack"); // introduced in 1.5.5-9.13846 + lua_classvariable(luaVM, "jetpack", "setPedWearingJetpack", "isPedWearingJetpack"); // introduced in 1.5.5-9.13846 lua_classvariable(luaVM, "armor", "setPedArmor", "getPedArmor"); lua_classvariable(luaVM, "fightingStyle", "setPedFightingStyle", "getPedFightingStyle"); lua_classvariable(luaVM, "cameraRotation", "setPedCameraRotation", "getPedCameraRotation");