@@ -72,6 +72,7 @@ void CLuaPedDefs::LoadFunctions()
7272 {" isPedFootBloodEnabled" , IsPedFootBloodEnabled},
7373 {" getPedCameraRotation" , GetPedCameraRotation},
7474 {" getPedOxygenLevel" , GetPedOxygenLevel},
75+ {" isPedBleeding" , ArgumentParser<IsPedBleeding>},
7576
7677 {" setPedWeaponSlot" , SetPedWeaponSlot},
7778 {" setPedRotation" , SetPedRotation},
@@ -101,6 +102,7 @@ void CLuaPedDefs::LoadFunctions()
101102 {" isPedReloadingWeapon" , IsPedReloadingWeapon},
102103 {" setPedEnterVehicle" , ArgumentParser<SetPedEnterVehicle>},
103104 {" setPedExitVehicle" , ArgumentParser<SetPedExitVehicle>},
105+ {" setPedBleeding" , ArgumentParser<SetPedBleeding>},
104106 };
105107
106108 // Add functions
@@ -165,6 +167,7 @@ void CLuaPedDefs::AddClass(lua_State* luaVM)
165167 lua_classfunction (luaVM, " getCameraRotation" , " getPedCameraRotation" );
166168 lua_classfunction (luaVM, " getWeaponSlot" , " getPedWeaponSlot" );
167169 lua_classfunction (luaVM, " getWalkingStyle" , " getPedWalkingStyle" );
170+ lua_classfunction (luaVM, " isBleeding" , " isPedBleeding" );
168171
169172 lua_classfunction (luaVM, " setCanBeKnockedOffBike" , " setPedCanBeKnockedOffBike" );
170173 lua_classfunction (luaVM, " setAnalogControlState" , " setPedAnalogControlState" );
@@ -192,6 +195,7 @@ void CLuaPedDefs::AddClass(lua_State* luaVM)
192195 lua_classfunction (luaVM, " isReloadingWeapon" , " isPedReloadingWeapon" );
193196 lua_classfunction (luaVM, " setEnterVehicle" , " setPedEnterVehicle" );
194197 lua_classfunction (luaVM, " setExitVehicle" , " setPedExitVehicle" );
198+ lua_classfunction (luaVM, " setBleeding" , " setPedBleeding" );
195199
196200 lua_classvariable (luaVM, " vehicle" , OOP_WarpPedIntoVehicle, GetPedOccupiedVehicle);
197201 lua_classvariable (luaVM, " vehicleSeat" , NULL , " getPedOccupiedVehicleSeat" );
@@ -216,6 +220,7 @@ void CLuaPedDefs::AddClass(lua_State* luaVM)
216220 lua_classvariable (luaVM, " dead" , NULL , " isPedDead" );
217221 lua_classvariable (luaVM, " targetingMarker" , " setPedTargetingMarkerEnabled" , " isPedTargetingMarkerEnabled" );
218222 lua_classvariable (luaVM, " footBlood" , " setPedFootBloodEnabled" , NULL );
223+ lua_classvariable (luaVM, " bleeding" , " setPedBleeding" , " isPedBleeding" );
219224 lua_classvariable (luaVM, " targetCollision" , nullptr , OOP_GetPedTargetCollision);
220225 lua_classvariable (luaVM, " targetEnd" , nullptr , OOP_GetPedTargetEnd);
221226 lua_classvariable (luaVM, " targetStart" , nullptr , OOP_GetPedTargetStart);
@@ -1498,6 +1503,11 @@ int CLuaPedDefs::IsPedFootBloodEnabled(lua_State* luaVM)
14981503 return 1 ;
14991504}
15001505
1506+ bool CLuaPedDefs::IsPedBleeding (CClientPed* pPed)
1507+ {
1508+ return pPed->IsBleeding ();
1509+ }
1510+
15011511int CLuaPedDefs::GetPedCameraRotation (lua_State* luaVM)
15021512{
15031513 // Verify the argument
@@ -1959,6 +1969,12 @@ int CLuaPedDefs::SetPedFootBloodEnabled(lua_State* luaVM)
19591969 return 1 ;
19601970}
19611971
1972+ bool CLuaPedDefs::SetPedBleeding (CClientPed* ped, bool bleeding)
1973+ {
1974+ ped->SetBleeding (bleeding);
1975+ return true ;
1976+ }
1977+
19621978int CLuaPedDefs::SetPedCameraRotation (lua_State* luaVM)
19631979{
19641980 // bool setPedCameraRotation ( ped thePed, float cameraRotation )
0 commit comments