Fixed ItemCategory code example.
This commit is contained in:
parent
690e6cb6f8
commit
e555cb4ab3
@ -2570,8 +2570,8 @@ World:ForEachEntity(
|
|||||||
The following code snippet checks if the player holds a shovel.
|
The following code snippet checks if the player holds a shovel.
|
||||||
<pre class="prettyprint lang-lua">
|
<pre class="prettyprint lang-lua">
|
||||||
-- a_Player is a {{cPlayer}} object, possibly received as a hook param
|
-- a_Player is a {{cPlayer}} object, possibly received as a hook param
|
||||||
local HeldItem = a_Player:GetEquippedItem();
|
local HeldItem = a_Player:GetEquippedItem()
|
||||||
if (cItemCategory:IsShovel(HeldItem.m_ItemType)) then
|
if (ItemCategory.IsShovel(HeldItem.m_ItemType)) then
|
||||||
-- It's a shovel
|
-- It's a shovel
|
||||||
end
|
end
|
||||||
</pre>
|
</pre>
|
||||||
|
Loading…
Reference in New Issue
Block a user