I have the plugin working, it seemed after compiling I had to copy and paste the newly created .smx over to the plugins folder instead of having it stay in the compiled folder.
Now that it is working, is there a way to have it run on the gameserver port? Or at least on a variable port so multiple server can be watched?
EDIT:
I found it out myself and made a slight adjustment in the script:
Code:
public OnAllPluginsLoaded()
{
decl String:sServerIP[40];
new longip = GetConVarInt(FindConVar("hostip")), pieces[4];
pieces[0] = (longip >> 24) & 0x000000FF;
pieces[1] = (longip >> 16) & 0x000000FF;
pieces[2] = (longip >> 8) & 0x000000FF;
pieces[3] = longip & 0x000000FF;
FormatEx(sServerIP, sizeof(sServerIP), "%d.%d.%d.%d", pieces[0], pieces[1], pieces[2], pieces[3]);
new dport = GetConVarInt( FindConVar( "tv_port" ) );
if(g_hListenSocket == INVALID_WEBSOCKET_HANDLE)
g_hListenSocket = Websocket_Open(sServerIP, dport, OnWebsocketIncoming, OnWebsocketMasterError, OnWebsocketMasterClose);
}
Any plans on making this compatible for csgo?
Would that require a rewrite of the sockets? websockets? or the websockets_sourcetv2d?