Difference between revisions of "LUA:BreatheUnderwater"

 
Line 1: Line 1:
= LUA Functions: BreatheUnderwater() =
+
{{LUAFunction
Lets the given spawn breathe underwater
+
|Name = BreatheUnderwater
 
+
|Description = Lets the given spawn breathe underwater
==== Syntax ====
+
|Param1 = Spawn
BreatheUnderwater(param1, param2)
+
|Param1Desc = is the spawn to breathe underwater
 
+
|Param2 = bool
 
+
|Param2Desc = is true to allow the spawn to breathe underwater
==== Parameters ====
+
|Example =
; Required - ''param1'' (Spawn), ''param2'' (bool)
 
: ''param1'' is the spawn to breathe underwater
 
: ''param2'' is true to allow the spawn to breathe underwater
 
 
 
 
 
==== Usage ====
 
 
<pre>
 
<pre>
 
function hailed(NPC, Spawn)
 
function hailed(NPC, Spawn)
Line 18: Line 12:
 
end
 
end
 
</pre>
 
</pre>
 
+
|ExampleDesc = When the NPC is hailed the Player will be able to breathe underwater
When the NPC is hailed the Player will be able to breathe underwater
+
|Notes = To disable pass false
 
+
}}
== Notes ==
 
To disable pass false
 

Latest revision as of 12:20, 30 January 2021


LUA:AllFunctions - BreatheUnderwater

Return to: LUA:AllFunctions | Tutorials | Portal | Forum | Project Manager | Bug Tracker


Lets the given spawn breathe underwater

Syntax

BreatheUnderwater(param1, param2)

Parameters

Required - param1 (Spawn), param2 (bool)
param1 is the spawn to breathe underwater
param2 is true to allow the spawn to breathe underwater


Example

function hailed(NPC, Spawn)
    BreatheUnderwater(Spawn, true)
end

When the NPC is hailed the Player will be able to breathe underwater

Notes

To disable pass false