AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] GameMe Connect Message (https://forums.alliedmods.net/showthread.php?t=281999)

Mitchell 04-26-2016 13:12

[ANY] GameMe Connect Message
 
GameMe Connect Message
This will display a connect message (adjusted through convar) when ever a player connects.

How it works:
There is a webserver php script which will parse the gameme's API XML output into something smaller and readable for SteamWorks to read easily.

Convars:
Code:

sm_gmconnect_enable 1 //Enables/Disables this plugin.
sm_gmconnect_redirect "" //Link to the hosted PHP script
sm_gmconnect_account "" //Gameme Account
sm_gmconnect_format "--" //Connect Message format, see below {1}
sm_gmconnect_error_format "--" //Connect Message format for when a player is not in the gameMe database, see below {1}
sm_gmconnect_flag "b" // User must have this flag to be able to see the connect message, set to blank for all players can see.
sm_gmconnect_game "" //Game of which the server is currently wanting to poll, i.e. "csgo"/"tf2" {2}
sm_gmconnect_method "0" //Method of when the connect message is shown; 0 = OnClientAuth, 1 = Player_spawn

{1} Formatted String
The connect message (as of v1.1.0) has only a few options to print: rank, time, kills, deaths, assists.
These tags are replaced with the following:
{rank} - Player's Overall Rank.
{kills} - Player's total kills
{deaths} - Player's total deaths.
{assists} - Player's total assists.
{itime} - Prints out the int value of time
{ftime} - Prints out the formatted string of time.
There are color tags which are replaced with their corresponding unicode, i.e. {07}/{08} will be replaced with the source2009 unicode to do hex color codes: {07}FF0000 will be Full Red, etc.

Example format (CS:GO):
{0F}[{10}GMC{0F}]{03} {name}{01} connected. Rank: #{04}{rank}
[GMC] mtch connected. Rank: #16

{2} Game Convar
This is a convar just incase you want tf2/csgo stats to show up in other games, etc.
List of supported games by GameMe


Setup
Just upload the php script to your webspace, and setup the config to your gameme account to poll.


Right now the plugin only works for getting the overall status the player's accounts, player kills and deaths will be from all game servers in the selected game/account pair. I plan on adding more to this, and having the ability to request more specific stats. Right now the php script is generic as fuck, and will error out if not properly handled.

DOWNLOAD
Plugin
WebServer PHP Script
Source
Github

sazonische 05-03-2016 20:11

Re: [ANY] GameMe Connect Message
 
Help my friend

Quote:

Originally Posted by sazonische (Post 2416438)
L 05/04/2016 - 02:42:04: [mmcs/gameme_connect.smx] ERROR hRequest(0): http://mmcs.pro/gamemeconnect.php
L 05/04/2016 - 02:44:53: [mmcs/gameme_connect.smx] ERROR hRequest(0): http://mmcs.pro/gamemeconnect.php
L 05/04/2016 - 02:48:25: [mmcs/gameme_connect.smx] ERROR hRequest(0): http://mmcs.pro/gamemeconnect.php

[03-May-2016 23:42:05 UTC] PHP Warning: file_get_contents(http:///api/playerinfo//): failed to open stream: operation failed in /home/surf/public_html/gamemeconnect.php on line 6
[03-May-2016 23:42:05 UTC] PHP Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/surf/public_html/gamemeconnect.php:6
Stack trace:
#0 /home/surf/public_html/gamemeconnect.php(6): SimpleXMLElement->__construct('')
#1 {main}
thrown in /home/surf/public_html/gamemeconnect.php on line 6
[03-May-2016 23:50:58 UTC] PHP Warning: file_get_contents(http:///api/playerinfo//): failed to open stream: operation failed in /home/surf/public_html/gamemeconnect.php on line 6
[03-May-2016 23:50:58 UTC] PHP Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/surf/public_html/gamemeconnect.php:6
Stack trace:
#0 /home/surf/public_html/gamemeconnect.php(6): SimpleXMLElement->__construct('')
#1 {main}
thrown in /home/surf/public_html/gamemeconnect.php on line 6

Mitchell 07-14-2016 14:59

Re: [ANY] GameMe Connect Message
 
Quote:

Originally Posted by sazonische (Post 2416439)
Help my friend



[03-May-2016 23:42:05 UTC] PHP Warning: file_get_contents(http:///api/playerinfo//): failed to open stream: operation failed in /home/surf/public_html/gamemeconnect.php on line 6
[03-May-2016 23:42:05 UTC] PHP Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/surf/public_html/gamemeconnect.php:6
Stack trace:
#0 /home/surf/public_html/gamemeconnect.php(6): SimpleXMLElement->__construct('')
#1 {main}
thrown in /home/surf/public_html/gamemeconnect.php on line 6
[03-May-2016 23:50:58 UTC] PHP Warning: file_get_contents(http:///api/playerinfo//): failed to open stream: operation failed in /home/surf/public_html/gamemeconnect.php on line 6
[03-May-2016 23:50:58 UTC] PHP Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/surf/public_html/gamemeconnect.php:6
Stack trace:
#0 /home/surf/public_html/gamemeconnect.php(6): SimpleXMLElement->__construct('')
#1 {main}
thrown in /home/surf/public_html/gamemeconnect.php on line 6

What is in your /cfg/sourcemod/GameMeConnect.cfg?

MFS 07-16-2016 07:25

Re: [ANY] GameMe Connect Message
 
Dear Mitchell

Please give an example of the plugin settings.

It includes the namefile of your script or not?
sm_gmconnect_redirect "" //Link to the hosted PHP script

This is the CustomerID or third-level domain, eg http://frag.gameme.com?
sm_gmconnect_account "" //Gameme Account

Mitchell 07-16-2016 16:52

Re: [ANY] GameMe Connect Message
 
Quote:

Originally Posted by MFS (Post 2437078)
Dear Mitchell

Please give an example of the plugin settings.

It includes the namefile of your script or not?
sm_gmconnect_redirect "" //Link to the hosted PHP script

This is the CustomerID or third-level domain, eg http://frag.gameme.com?
sm_gmconnect_account "" //Gameme Account


sm_gmconnect_redirect "http://mtch.tech/gameme/gamemeconnect.php"
sm_gmconnect_account "frag"

MFS 07-16-2016 19:32

Re: [ANY] GameMe Connect Message
 
L 07/17/2016 - 02:26:39: [gameme_connect.smx] Steamworks client request failed, returned error
L 07/17/2016 - 02:26:39: [gameme_connect.smx] error

Mitchell 07-17-2016 15:17

Re: [ANY] GameMe Connect Message
 
Quote:

Originally Posted by MFS (Post 2437179)
L 07/17/2016 - 02:26:39: [gameme_connect.smx] Steamworks client request failed, returned error
L 07/17/2016 - 02:26:39: [gameme_connect.smx] error

PM your cvars that are set.
And does that error happen on load or when ever a player connects?

deadbeat 12-07-2016 23:18

Re: [ANY] GameMe Connect Message
 
I dont believe this plugin is working anymore and I really would like to use it.

Exception reported: Not enough space on the heap
L 12/07/2016 - 21:25:17: [SM] Blaming: gameme_connect.smx
L 12/07/2016 - 21:25:17: [SM] Call stack trace:
L 12/07/2016 - 21:25:17: [SM] [1] Line 204, D:\ScriptsGit\GameMeConnect\scripting\gameme_ connect.sp::OnSteamWorksHTTPComplete

Mitchell 12-15-2016 14:12

Re: [ANY] GameMe Connect Message
 
Version 1.2.2
Added error checking in PHP script, this will need to be updated.
Added ConVar "sm_gmconnect_error_format" which will be the message that is displayed when a player connects for the first time on the server.
This should fix any issue where the plugin might error out.

If you are hacking issues with the SteamWorks extension try moving the php script into it's own directory, instead of the public directory.

1.2.2 Release (GitHub)

deadbeat 01-07-2017 15:19

Re: [ANY] GameMe Connect Message
 
I got this message in the sm ertor log file.L 01/06/2017 -
PHP Code:

22:09:07SourceMod error session started
L 01
/06/2017 22:09:07Info (map "cs_office") (file "errors_20170106.log")
L 01/06/2017 22:09:07: [gameme_connect.smxSteamWorks error (status code 0). Request successfulFalse
L 01
/06/2017 22:13:23: [gameme_connect.smxSteamWorks error (status code 0). Request successfulFalse
L 01
/06/2017 22:34:18Error log file session closed 

It still seems like the plugin is working though. Should I update the steam works exension?


All times are GMT -4. The time now is 19:07.

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