Created
December 14, 2015 20:41
-
-
Save evotopid/5d2c5bad1117534c3f7f to your computer and use it in GitHub Desktop.
Proof of issue plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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