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

Cross chat between SourceTV and main server


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kshishu
Junior Member
Join Date: Mar 2016
Location: Opole
Old 12-04-2017 , 11:53   Cross chat between SourceTV and main server
Reply With Quote #1

Hey,

I need plugin or some help to create plugin for crossing chats.

When I write on chat being at sourcetv (no tv delay) everyone on MAIN server should see this message.

On Sourcetv server:
"(SourceTV) Leon Le Professionnel : test"

So on main server we should see this:
"(SourceTV) Leon Le Professionnel : test"

Can anyone explain me how can I do this? or maybe this is not possible??

Thanks you all
__________________



kshishu is offline
Send a message via Skype™ to kshishu
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 12-08-2017 , 01:23   Re: Cross chat between SourceTV and main server
Reply With Quote #2

What game is it? If it's CS:S or CS:GO, I can write this for you.
__________________
retired
shavit is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 12-08-2017 , 07:09   Re: Cross chat between SourceTV and main server
Reply With Quote #3

Shouldn't be too bad as long as your game supports SourceTV Manager.

Just implement SourceTV_OnSpectatorChatMessage_Post and output the message with PrintToChat.

Something like this:
Code:
#pragma semicolon 1
#include <sourcemod>

#pragma newdecls required
#include <sourcetvmanager>

public void SourceTV_OnSpectatorChatMessage_Post(int tvclient, const char[] message,
		const char[] group) {
	// message already includes player name
	for (int i = 1; i <= MaxClients; i++) {
		// avoid sending it back to STV
		if (IsClientInGame(i) && !IsClientSourceTV(i)) {
			PrintToChat(i, "(SourceTV) %s", message);
		}
	}
	
	PrintToServer("%s", message);
}
__________________
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; 12-08-2017 at 07:36.
nosoop is offline
kshishu
Junior Member
Join Date: Mar 2016
Location: Opole
Old 12-09-2017 , 09:42   Re: Cross chat between SourceTV and main server
Reply With Quote #4

My server is for CS:S.

Thanks noscoop I will test now.
__________________



kshishu is offline
Send a message via Skype™ to kshishu
kshishu
Junior Member
Join Date: Mar 2016
Location: Opole
Old 12-09-2017 , 09:59   Re: Cross chat between SourceTV and main server
Reply With Quote #5

L 12/09/2017 - 15:54:19: [SM] Unable to load extension "sourcetvmanager.ext": /XXX/cstrike/addons/sourcemod/extensions/sourcetvmanager.ext.2.css.so: undefined symbol: Warning

The extension is not loading ;/

I have linux server
__________________



kshishu is offline
Send a message via Skype™ to kshishu
nosoop
Veteran Member
Join Date: Aug 2014
Old 12-09-2017 , 12:06   Re: Cross chat between SourceTV and main server
Reply With Quote #6

Using TF2 on Linux here; if I remember correctly it was an issue with being built with GCC.

Here's a copy I built with Clang when I was building the extension for TF2 (built 2017-02-17, should correspond to the last extension code commit). Would rebuild it again, but I'm just about ready to hit the bed.
Attached Files
File Type: so sourcetvmanager.ext.2.css.so (737.1 KB, 114 views)
__________________
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; 12-09-2017 at 12:06.
nosoop is offline
kshishu
Junior Member
Join Date: Mar 2016
Location: Opole
Old 12-09-2017 , 14:48   Re: Cross chat between SourceTV and main server
Reply With Quote #7

Thank you so much nosoop! it's working fine .

@close
__________________



kshishu is offline
Send a message via Skype™ to kshishu
Reply



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 20:57.


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