Raised This Month: $12 Target: $400
 3% 

SourceTV Manager


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 03-15-2016 , 10:48   SourceTV Manager
Reply With Quote #1

SourceTV Manager

Interface to interact with the SourceTV server from SourcePawn.
https://github.com/peace-maker/sourcetvmanager

Lets you access SourceTV servers and interact with the spectators as well as handle demo recording.

API
There are a few natives and forwards in the include file for
  • Basic SourceTV information (stats, delay, active)
  • Interacting with spectators (chat/console messages, kick, ip, name)
  • Forcing camera shots on the director
  • Demo recording (filename, recording tick, print message to demo console)

Steam authentication
By default, SourceTV spectators aren't authenticated with Steam. This extension adds a
tv_force_steamauth convar to enable authentication on spectator clients.
Currently this prevents SourceTV relay proxy clients from connecting though

"status" command in demos
There is special effort done in this extension to have the "status" output recorded in SourceTV demos, so you can easily identify players when watching the demo. Just do
PHP Code:
FakeClientCommand(SourceTV_GetBotIndex(), "status"); 
I've only tested this in CS:GO and CS:S, but the TF2 gamedata was the same as CS:S, so odds are good it's working on all OBV games.

Download

Nightly build

Sourcecode
Gamedata

Look here for examples how to use the natives.

Thanks to GoD-Tony and asherkin.
__________________

Last edited by Peace-Maker; 05-07-2021 at 08:39. Reason: Added gamedata link
Peace-Maker is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 03-15-2016 , 12:58   Re: SourceTV Manager
Reply With Quote #2

Looks good, absolutely useful

Φ ϴ
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
good_live
AlliedModders Donor
Join Date: Oct 2013
Old 03-16-2016 , 02:24   Re: SourceTV Manager
Reply With Quote #3

Nice one. Goign to check it out later
good_live is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 03-16-2016 , 19:06   Re: SourceTV Manager
Reply With Quote #4

The extension appears to be calling the SourceTV_OnSpectatorPutInServer forward multiple times for the same SourceTV client, an additional one per connect.

It also doesn't seem to be calling SourceTV_OnSpectatorDisconnect or the disconnected variation.

Edit: This is occurring on Team Fortress 2.

Here's some server console spew from the test plugin.

Client "Pikachu on LSD" connected (*:27005).
SourceTV client 1 connected. (isconnected 1)
SourceTV spectator is connecting! Name: Pikachu on LSD, pw: *, ip: *
*:27005:reconnect
Dropped Pikachu on LSD from server (Connection closing)
Client "Pikachu on LSD" connected (*:27005).
SourceTV client 1 connected. (isconnected 1)
SourceTV client 1 put in server.
SourceTV client 1 put in server.
SourceTV client 1 put in server.
SourceTV client 1 put in server.
SourceTV client 1 put in server.
SourceTV client 1 put in server.
[omitted a bunch more]
Dropped Pikachu on LSD from server (Disconnect by user.)
sm plugins unload sourcetv_test
[SM] Plugin sourcetv_test.smx unloaded successfully.


Awesome work though; I've been wanting some SourceTV support.
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)

Last edited by nosoop; 03-16-2016 at 20:15.
nosoop is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 03-17-2016 , 07:38   Re: SourceTV Manager
Reply With Quote #5

Quote:
Originally Posted by nosoop View Post
The extension appears to be calling the SourceTV_OnSpectatorPutInServer forward multiple times for the same SourceTV client, an additional one per connect.

It also doesn't seem to be calling SourceTV_OnSpectatorDisconnect or the disconnected variation.
Are you on linux?

EDIT: Try the attached version including this change. It's all been about not catching spectator disconnects, so they weren't unhooked. The extension added another hook on the same cached hltvclient instance when a new spectator joined on the same slot, so OnSpectatorPutInServer was called multiple times.
Attached Files
File Type: zip sourcetvmanager_1.0.0-dev.zip (2.64 MB, 465 views)
__________________

Last edited by Peace-Maker; 03-17-2016 at 08:57.
Peace-Maker is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 03-17-2016 , 17:01   Re: SourceTV Manager
Reply With Quote #6

Yeah, forgot to mention I'm on Linux. New one works as expected; thanks!
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)
nosoop is offline
good_live
AlliedModders Donor
Join Date: Oct 2013
Old 04-11-2016 , 14:49   Re: SourceTV Manager
Reply With Quote #7

My Server keeps crashing, whenever im trying to start to record a demo.

Game: CS:GO
Sourcemod Version: 1.7

Root: Debian 8

Crashreport: https://crash.limetech.org/oomotcfsdgud

Would be nice if you could take a look at it.

Last edited by good_live; 04-13-2016 at 02:29.
good_live is offline
iGANGNAM
AlliedModders Donor
Join Date: Sep 2012
Location: Lithuania
Old 04-12-2016 , 01:22   Re: SourceTV Manager
Reply With Quote #8

I haven't tried this yet, but I can say it would save alot of time...
Is there any possibility to cut demo?

I would love to see this extension cooperating with this plugin https://forums.alliedmods.net/showthread.php?t=279296
__________________

Last edited by iGANGNAM; 04-12-2016 at 01:22.
iGANGNAM is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 04-12-2016 , 04:16   Re: SourceTV Manager
Reply With Quote #9

Quote:
Originally Posted by iGANGNAM View Post
I haven't tried this yet, but I can say it would save alot of time...
Is there any possibility to cut demo?

I would love to see this extension cooperating with this plugin https://forums.alliedmods.net/showthread.php?t=279296
Cut the demo? What do you have in mind?


I'll have a look at the crash later.
__________________
Peace-Maker is offline
iGANGNAM
AlliedModders Donor
Join Date: Sep 2012
Location: Lithuania
Old 04-12-2016 , 13:28   Re: SourceTV Manager
Reply With Quote #10

Quote:
Originally Posted by Peace-Maker View Post
Cut the demo? What do you have in mind?


I'll have a look at the crash later.
Let's say that map has 20 minutes and player was banned on 9 minute of the map so it could cut demo and it would be only from 4 minute to 9 min only (instead of 20 mins) and than it could be easily uploaded to sourcebans and attached as demo of course. (https://forums.alliedmods.net/showthread.php?t=279296)
So main thing that "MAIN" demo should not be stopped because other player can be banned like after few mins.

I bet 100% would love this feature!
__________________

Last edited by iGANGNAM; 04-12-2016 at 13:30.
iGANGNAM is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:13.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode