IsPedOnFire: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Ibazooka (talk | contribs)
No edit summary
FileEX (talk | contribs)
mNo edit summary
 
Line 2: Line 2:
{{Server client function}}
{{Server client function}}
This function checks if the specified [[ped]] is on fire or not.
This function checks if the specified [[ped]] is on fire or not.
{{deprecated|isElementOnFire}}


==Syntax==
==Syntax==

Latest revision as of 03:04, 31 December 2024

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


This function is deprecated. This means that its use is discouraged and that it might not exist in future versions.

Please use isElementOnFire instead.


Syntax

bool isPedOnFire ( ped thePed )

OOP Syntax Help! I don't understand this!

Method: ped:isOnFire(...)
Variable: .onFire
Counterpart: setPedOnFire


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