Cuberite Forum
How to paste code snippets in a thread - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Plugins (https://forum.cuberite.org/forum-1.html)
+--- Forum: Plugin Discussion (https://forum.cuberite.org/forum-8.html)
+--- Thread: How to paste code snippets in a thread (/thread-574.html)



How to paste code snippets in a thread - FakeTruth - 10-07-2012

If you want to post Lua snippets use
Code:
[shcode=lua]code here![/shcode]

This does all sort of fancy syntax highlighting. Check it out:
function Initialize(Plugin)
	Plugin:SetName("ChatLog")
	Plugin:SetVersion(3)

	cPluginManager.AddHook(cPluginManager.HOOK_CHAT, OnChat)

	LOG("Initialized " .. Plugin:GetName() .. " v." .. Plugin:GetVersion())
	return true
end

function OnChat(Player, Message)
	-- Lets get loggin\'
	LOGINFO("[" .. Player:GetName() .. "]: " .. StripColorCodes(Message));

	return false
end
Look at it, just look at it! It's so perty