STools help

So i am creating a STool and it works alright BUT, i got some problems. I need to make the undo work, but i need a player, in this case, the one who used the tool, how would i get that player? And also, i have a CheckBox on the panel but no idea how to get data from it. Any help is appreciated. Thanks.

Just look how standard tools that are shipped with GMod do it.

You can figure it out.

That is what i was doing…
for the last…
3…
days…
and…
nothing…

https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stools/camera.lua

This tool has the least code with a check box that affects the tool output.

Line 5 - create convar
Line 71 - get convar value on server
Line 104 - the checkbox

Something tells me you just didn’t even try, just like everyone who comes here.

As for undos, from Wheel tool:
https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stools/wheel.lua#L77-L82

I did actually try, i have arround 200 lines of code already done, but just those 2 bugs;