Tools and lua_reloadent

So I’m trying my hand at STools for the first time and I’m having a few difficulties. First of all, how do you reload the tool using TomyLobo’s lua_reloadent? Is it something to do with the toolmode (and if so, what is that)?

Also, how do you set the text that shows up in the top right?

You can’t really reload it with lua_reloadent. You have to reload the actual lua script.

I think you used some AddLanguage -function to add the tool name and stuff. Can’t remember which library it was in, though…


Oh, it was just **[Language.Add](**


And there’s actually a relevant example in that article

Hmm. Ok, thanks. But so if the name of the tool was “PermaProps”, would I need a hash mark in front of that or is that good? (Also, I reload the tool by switching maps then?)

Edit: This is what i have so far.

[lua]if SERVER then

TOOL.Name = “#PermaProps
TOOL.Category = “Construction”
TOOL.Command = nil
TOOL.ConfigName = “”

if CLIENT then
language.Add( “Tool_permaprops_name”, “PermaProps” )
language.Add( “Tool_permaprops_desc”, “Save a prop for server restarts” )
language.Add( “Tool_permaprops_0”, “Left click to make a a prop permanent. Right click to make a prop temporary. Reload to check if a prop is permanent.” )
//language.Add( “Tool_unbreakable_etendre”, “Extend to constrained objects” )

function TOOL:LeftClick( tr )


function TOOL:RightClick( tr )


function TOOL.BuildCPanel( panel)

panel:AddControl( "Header"  , { Text = "#Tool_permaprops_name", Description	= "#Tool_permaprops_desc" }  )


However, the upper-left just shows “#Toolwhatever”, it doesn’t show the name/description. What’s going on there?

Edit 2: Fixed, I had to rename the file.

The hash mark is automagically added by GMod.