Entity/Extinguish

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m
 
Line 1: Line 1:
 
{{Func
 
{{Func
|Name=Extinguish
 
|Parent=Entity
 
 
|Description=Extinguishes the entity if it is on fire.
 
|Description=Extinguishes the entity if it is on fire.
<br>Has no effect if called inside EntityTakeDamage (and the attacker is the flame that's hurting the entity)
+
<br>Has no effect if called inside {{HookFunction|GM|EntityTakeDamage}} (and the attacker is the flame that's hurting the entity)
 +
 
 +
See also {{ClassFunction|Entity|Ignite}}.
 
|Realm=Server
 
|Realm=Server
 
|IsClass=Yes
 
|IsClass=Yes
Line 9: Line 9:
 
{{Example
 
{{Example
 
|Description=Demonstrates the use of this function.
 
|Description=Demonstrates the use of this function.
|Code=player.GetAll()[1]:Extinguish()
+
|Code=Player(1):Extinguish()
 
|Output=Extinguishes the first player if he is on fire.
 
|Output=Extinguishes the first player if he is on fire.
 
}}
 
}}

Latest revision as of 20:06, 8 October 2019

 Entity:Extinguish( )

Description

Extinguishes the entity if it is on fire.
Has no effect if called inside GM:EntityTakeDamage (and the attacker is the flame that's hurting the entity)

See also Entity:Ignite.

Examples

Example

Demonstrates the use of this function.

Player(1):Extinguish()

Output:

Extinguishes the first player if he is on fire.
Personal tools
Navigation