Worldedit [Creating one myself :)]
#9
ok i tried like you said with creating a block where you stand and i have this:
function Initialize( Plugin )
	PLUGIN = Plugin
	
	Plugin:SetName( "PlaceHere" )
	Plugin:SetVersion( 1 )
	
	PluginManager = cRoot:Get():GetPluginManager()
	PluginManager:AddHook( Plugin, cPluginManager.E_PLUGIN_CHAT )
	
	Plugin:AddCommand("/PlaceHere",         " - Places a block where you stand",                 "PlaceHere.PlaceHere")
	
	Plugin:BindCommand( "/PlaceHere",            "PlaceHere.PlaceHere",            HandlePlaceHereCommand )
	Plugin:BindCommand( "/ph",                   "placehere.placehere",            HandlePlaceHereCommand )
	
	
	function HandlePlaceHereCommand( Split, Player)
	
	local World = cRoot:Get():GetDefaultWorld()
	local Name  = Player:GetName()
	
	IncrementUndoGroup( Name )
		
		X = mFloor(Player:GetPosX())
		Y = mFloor(Player:GetPosY())
		Z = mFloor(Player:GetPosZ())
			
		if Y ~= -1 then
			CuboidBlockPlace(X, Y, Z, fillBlock, 1, Name)
			Server:SendMessage( cChatColor.Green .. "Block placed at: ".. cChatColor.White .." X:" ..X.. " Y:" ..Y.. " Z:" ..Z.. "", Player )
		end
	end
	return true
end

LOG( "Initialized " .. Plugin:GetName() .. " v." .. Plugin:GetVersion() )
    return true
end
it says that there is an error close to the last "end"
Reply
Thanks given by:


Messages In This Thread
Worldedit [Creating one myself :)] - by NiLSPACE - 10-04-2012, 01:51 AM
RE: Worldedit - by xoft - 10-04-2012, 04:09 AM
RE: Worldedit - by NiLSPACE - 10-04-2012, 04:15 AM
RE: Worldedit - by xoft - 10-04-2012, 04:19 AM
RE: Worldedit - by NiLSPACE - 10-04-2012, 05:04 AM
RE: Worldedit - by NiLSPACE - 10-05-2012, 12:25 AM
RE: Worldedit - by xoft - 10-05-2012, 02:38 AM
RE: Worldedit - by Taugeshtu - 10-05-2012, 06:03 AM
RE: Worldedit - by NiLSPACE - 10-06-2012, 09:19 PM
RE: Worldedit - by xoft - 10-06-2012, 10:33 PM
RE: Worldedit - by FakeTruth - 10-07-2012, 06:47 AM
RE: Worldedit - by xoft - 10-07-2012, 06:59 AM



Users browsing this thread: 1 Guest(s)