Cloud Camera

Hello all, this is a simple SWEP release as an example for the gmcl_screenshots module.

This addon and module is the result of an idea by CapsAdmin.

I thought to myself that this is an interesting idea, so I went about to create it.

This requires a clientside module which implements the screenshot functionality. The source is in the download archive, in lua/includes/modules/ or viewable at: https://code.google.com/p/gmodmodules/source/browse/trunk/gmcl_screenshots/gmcl_screenshots/main.cpp

The module doesn’t publish your screenshots to steam cloud, it simply caches them locally and you can publish them later using the Steam screenshot manager. This is basically the same as using the game overlay and pressing F12, except this is controlled by lua code.

[release]
Download: http://dl.dropbox.com/u/99606/gmod/cloud_camera_v1.rar

Requires: C++ 2008 Runtime
[/release]

Here’s an example of what it can do: http://steamcommunity.com/id/VoiDeD/screenshot/541761942787792359

Important Note!!
This module makes use of a feature that could potentially break during Steamclient updates. If a steam update comes out and this module is causing crashes or otherwise random behavior, please let me know ASAP!

For developers
This module exposes a global table named screenshots, and a single function called Take. The function returns a boolean value indicating if the screenshot was taken successfully.

Example code:
[lua]
require( “screenshots” )

local bSuccess = screenshots.Take()
MsgN( "Took screenshot! Success: ", bSuccess )
[/lua]

-snip- misread.

looks useful

i will use this camera tool to document The Garry Mod Tower 9/11.

Looks very useful, is there any way around using a .dll?

Didnt work for me.
Nothing happened

-snip, obvious question-

I’ll be doing this

[lua]
require(“screenshots”)

hook.Add(“KeyPress”, “cloud_screenshots”, function(ply, key)
if screenshots and ply:GetActiveWeapon():IsWeapon() and ply:GetActiveWeapon():GetClass() == “gmod_camera” and key == IN_ATTACK then
if not screenshots.Take() then
print(“failed to take steam cloud screenshot!”)
end
end
end)
[/lua]

so I don’t have to install anything on the server

handy