IsPedOnFire

From Multi Theft Auto: Wiki
Revision as of 16:06, 12 September 2008 by Ryden (talk | contribs) (New page: __NOTOC__ {{Server client function}} This function checks if the specified ped is on fire or not. ==Syntax== <syntaxhighlight lang="lua">bool isPedOnFire ( ped thePed )</syntaxhighlight> ===Required Arguments...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function checks if the specified ped is on fire or not.

Syntax

bool isPedOnFire ( ped thePed )

Required Arguments

  • thePed: The ped to check.

Returns

Returns true if the ped is on fire, false otherwise.

Example

Click to collapse [-]
Server

This example checks if a random player is on fire, and if so gives him a fire extinguisher.

local randomPlayer = getRandomPlayer()
if isPedOnFire ( randomPlayer ) then
	giveWeapon ( randomPlayer, 42, 100, true )
end

See Also