Hello Facepunch, I wanted to ask if its somehow possible, to record the view(and hud if possible) in like an demo, and upload it to the server? I wanted to have like, an watchbot or something of the sort, that records an demo, and uploads it each hour to the server, and in the hud some sort of timer, that shows which time it is
If you have a separate machine that can run the game and sit in-game constantly, yes.
You can use the record and stop commands from a timer and use external tools to transmit the final .dem files.
I thought about running
video.Record on the bot, but I dont know if thats possible(since its an player nextbot I think it kinda is), and if, how I grab & upload the file then(could be made over an PHP script or so).
As you can see on that page the function is only clientsided, so it won’t be possible to do so.
If you have an actual machine that’s running GMod you could create an external program (in whichever language) and have it check for newly created demos every 10 minutes or so, when it detects one POST it to your PHP upload script and you should be good.
But the real question here, what do you need the additional visual information for? There might be alternatives (recording buttons etc or something like that)
I want, as I said, something like an “Watchbot” so players dont have to give proof if something happens, and I just can see the demo.
Maybe what you should do is make a hook that adds a new key to a table (which includes the player’s view position and angles, etc) and then use a CalcView hook to move the view every frame to the new recorded location? That’s if you only care about the position of the view, though…