X Z
#1
MCServer sometimes gives the wrong X and Z coordinates. Ive noticed this while i was working on my WorldEdit plugin. i was adding a command that changes all the block above you to air blocks but it kept changing the blocks next to me. This was the code i used:
function HandleRemoveAboveCommand( Split, Player )
	X = Player:GetPosX()
	y = Player:GetPosY()
	Z = Player:GetPosZ()
	World = Player:GetWorld()
	RemoveAboveBlocks[Player:GetName()] = 0
	for Y = y, World:GetHeight( X, Z ) do
		World:SetBlock( X, Y, Z, 0, 0 )
		RemoveAboveBlocks[Player:GetName()] = RemoveAboveBlocks[Player:GetName()] + 1
	end
	Player:SendMessage( cChatColor.LightPurple .. RemoveAboveBlocks[Player:GetName()] .. " block(s) have been removed." )
	return true
end
Reply
Thanks given by:


Messages In This Thread
X Z - by NiLSPACE - 05-19-2013, 08:46 PM
RE: X Z - by tonibm19 - 05-19-2013, 09:08 PM
RE: X Z - by xoft - 05-19-2013, 09:57 PM
RE: X Z - by NiLSPACE - 05-19-2013, 10:40 PM



Users browsing this thread: 1 Guest(s)