Skip to content

Instantly share code, notes, and snippets.

@evotopid
Created December 14, 2015 20:41
Show Gist options
  • Save evotopid/5d2c5bad1117534c3f7f to your computer and use it in GitHub Desktop.
Save evotopid/5d2c5bad1117534c3f7f to your computer and use it in GitHub Desktop.
Proof of issue plugin
function Initialize(a_Plugin)
PLUGIN = a_Plugin
PLUGIN:SetName("AreaGetBlockIssue")
PLUGIN:SetVersion(1)
cPluginManager.BindCommand("/BlockIssue", "issue.getblock", HandleBlockIssueCommand, "Proof of concept")
return true
end
function OnDisable()
end
function HandleBlockIssueCommand( Split, Player )
local world = cRoot:Get():GetWorld("world")
function sleep(s)
local ntime = os.time() + s
repeat until os.time() > ntime
end
for i = 1,20 do
local area = cBlockArea()
area:Read(world, 7,51,7, 10,55,10)
print("Block id: " .. area:GetBlockType(0,0,0))
sleep(0.5)
end
return true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment