• STools help
    4 replies, posted
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.
[QUOTE=Robotboy655;47193170]Just look how standard tools that are shipped with GMod do it. You can figure it out.[/QUOTE] That is what i was doing... for the last... 3... days... and... nothing...
[url]https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stools/camera.lua[/url] 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: [url]https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stools/wheel.lua#L77-L82[/url]
[QUOTE=Robotboy655;47193274][url]https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stools/camera.lua[/url] 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: [url]https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/sandbox/entities/weapons/gmod_tool/stools/wheel.lua#L77-L82[/url][/QUOTE] I did actually try, i have arround 200 lines of code already done, but just those 2 bugs;
Sorry, you need to Log In to post a reply to this thread.