setPedBleeding | Multi Theft Auto: Wiki Skip to content

setPedBleeding

Client-side
Server-side
Shared

Pair: isPedBleeding

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function allows you to set player's or ped's bleeding effect.

OOP Syntax Help! I don't understand this!

  • Method:ped:setBleeding(...)
  • Variable: .bleeding

Syntax

bool setPedBleeding ( ped thePed, bool bleeding )
Required Arguments
  • thePed: The player or ped whose bleeding effect you want to set of.
  • bleeding: Boolean specifying whether the player or ped is bleeding or not.

Returns

  • bool: value

Returns true if the bleeding state was successfully set, false otherwise.

Code Examples

shared

This example causes the player to bleed.

addCommandHandler("bleed", function()
setPedBleeding(localPlayer, not isPedBleeding(localPlayer))
end)

See Also