Difference between revisions of "LUA:BreatheUnderwater"

 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
= LUA Functions: BreathUnderwater() =
+
{{LUAFunction
Lets the given spawn breath underwater
+
|Name = BreatheUnderwater
 
+
|Description = Lets the given spawn breathe underwater
==== Syntax ====
+
|Param1 = Spawn
BreathUnderwater(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 breath underwater
 
: ''param2'' is true to allow the spawn to breath underwater
 
 
 
 
 
==== Usage ====
 
 
<pre>
 
<pre>
 
function hailed(NPC, Spawn)
 
function hailed(NPC, Spawn)
     BreathUnderwater(Spawn, true)
+
     BreatheUnderwater(Spawn, true)
 
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 breath 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