Hello,
Need some help with this lua code :
(Seen in the Structures hooks documentation)
Have question about the block parameter. I think in the game all structure (like wall, foundation) must have a unique identifier.Code:function PLUGIN:OnStructureRepair(block, player) print("OnStructureRepair works!") end
Is it possible to get this unique ID with something like
If yes how ?Code:function PLUGIN:OnStructureRepair(block, player) print("OnStructureRepair works!") ID = block.blockIdentifier end
Solved OnStructureRepair(block, player) -> block parameter ?
Discussion in 'Rust Development' started by HUON, Feb 29, 2016.
-
Calytic Community Admin Community Mod
Code:block.prefabID block.name
-
Thanks, but that not what I was looking for.
If I repair on wall, I want the ID of this wall. And if I repair another wall, I want another ID.
I want to discern walls by them ID. -
block.net.ID ?
-
Thanks a lot nivex !
Code:function PLUGIN:OnStructureRepair(block, player) print("OnStructureRepair works!") ID = block.net.ID end
Perfect !