IsPedBleeding: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
(Remove obsolete Requirements section)
 
Line 24: Line 24:
addCommandHandler ("checkbleed", checkBleeding)
addCommandHandler ("checkbleed", checkBleeding)
</syntaxhighlight>
</syntaxhighlight>
==Requirements==
{{Requirements|n/a|1.5.8-9.20935|}}


==See Also==
==See Also==
{{Client ped functions}}
{{Client ped functions}}

Latest revision as of 17:28, 7 November 2024

This function gets the state of a player's or ped's bleeding effect.

Syntax

bool isPedBleeding ( ped thePed ) 

OOP Syntax Help! I don't understand this!

Method: ped:isBleeding(...)
Variable: .bleeding
Counterpart: setPedBleeding


Required Arguments

  • thePed: The player or ped whose bleeding effect state you want to get.

Returns

Returns true if the player or ped is bleeding, false otherwise.

Example

function checkBleeding ()
   if isPedBleeding (localPlayer) then
      outputChatBox ("The ped is bleeding!")
   else
      outputChatBox ("The ped is not bleeding!")
   end
end

addCommandHandler ("checkbleed", checkBleeding)

See Also