AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D & L4D2] GameTime Announcer <fork> v2.0.2 [28-May-2023] (https://forums.alliedmods.net/showthread.php?t=341707)

NoroHime 02-07-2023 14:11

[L4D & L4D2] GameTime Announcer <fork> v2.0.2 [28-May-2023]
 
3 Attachment(s)
about
  • a commision from my friend LindaFelicia, he request fix from source code, but i rewrited it
  • must get a steam dev key from https://steamcommunity.com/dev
  • must install extension "REST in Pawn", plugin can compile online but need that to work
  • already tested on l4d1 and l4d2


Credits
ConVar
PHP Code:

// admin flag to access sm_gametime command and receives query results,
// a=reserved slots, empty=everyone, see more in /configs/admin_levels.cfg
gametime_access ""

// important: valve dev key to query, get on https://steamcommunity.com/dev
gametime_devkey ""

// print messages when gametime fetch failed 1=console 2=public chat 3=both
gametime_failure "3"

// which query is prefer, if got once then dont announce another, 1=steam profile 2=achievement stats 0=display every
gametime_prefer "2"

// which gametime data sources to be query 1=steam profile 2=stats of achievement 3=both
gametime_queries "3" 

changelog
  • v2.0 (Start at 26-January-2023, Released at 8-February-2023)
    - all translation support
    - completely rewrite
    - validate response http status and validate response JSON
    - support lateload mode
    - merge Profile and Stats features on single plugin
    - fix player disconnected during requesting
    - remove color.inc requirement, but not {red} support anymore
    - solve memory leaks for handles
    - prefer mode
    - command access permission
    - support L4D1
    - dynamic wait dev key inputs
    - show all player GameTime when message receive available
    - sm_gametime [override *_prefer] display all of players gametime
    - command support console view all data
    - optional request failure actions
  • v2.0.1 (8-March-2023)
    - fix delay authorization cause gametime display not work
  • v2.0.2 (28-May-2023)
    - fix RESTInPawn extension not load automatically, thanks to Silvers

todo
  • maybe retry when request timeout or send fail


Installation
  • put l4d_gametime.smx on /plugins/
  • put l4d_gametime.phrases.txt on /translations/
  • required install extension "REST in Pawn", sourcemod cant handle network request by self

PVNDV 04-28-2023 05:55

Re: [L4D & L4D2] GameTime Announcer <fork> v2.0 [8-February-2023]
 
Some startup eggors
Code:

L 04/28/2023 - 12:47:15: [SM] Unable to load plugin "l4d_gametime.smx": Native "HTTPClient.HTTPClient" was not found

NoroHime 04-28-2023 07:31

Re: [L4D & L4D2] GameTime Announcer <fork> v2.0 [8-February-2023]
 
Quote:

Originally Posted by PVNDV (Post 2803525)
Some startup eggors
Code:

L 04/28/2023 - 12:47:15: [SM] Unable to load plugin "l4d_gametime.smx": Native "HTTPClient.HTTPClient" was not found

make sure you already installed Rest in Pawn?

PVNDV 04-28-2023 07:36

Re: [L4D & L4D2] GameTime Announcer <fork> v2.0 [8-February-2023]
 
Quote:

Originally Posted by NoroHime (Post 2803530)
make sure you already installed Rest in Pawn?

Yes, installed first

PVNDV 04-28-2023 07:52

Re: [L4D & L4D2] GameTime Announcer <fork> v2.0 [8-February-2023]
 
Quote:

Originally Posted by NoroHime (Post 2803530)
make sure you already installed Rest in Pawn?

Oh shiy, didn't notice that Rip is not loaded by the server, sorry

Thank you for something(I mean for the plugin)

Mika Misori 05-22-2023 12:43

Re: [L4D & L4D2] GameTime Announcer <fork> v2.0 [8-February-2023]
 
Quote:

Originally Posted by NoroHime (Post 2803530)
make sure you already installed Rest in Pawn?

I have so many questions and problems with this plugin, please help:

1. The extension "REST in Pawn" does not load automatically, I have to write sm exts load rip.ext.so to the console every time for it to load. I even tried adding this command to autoexec.cfg and server.cfg, it did not help.

2. Because of this the plugin doesn't load:
Code:

Errors:
<Failed> "[L4D & L4D2] GameTime Announcer <fork>" (2.0) by NoroHime
l4d_gametime.smx ([L4D & L4D2] GameTime Announcer <fork>): Native "HTTPClient.HTTPClient" was not found

I have to manually load the extension first, then the plugin with commands:
sm exts load rip.ext.so
sm plugins unload_all
sm plugins refresh


3. Plugin doesn't create config? My dev key for gametime_devkey also flies off all the time, should I add it to server.cfg?

4. The plugin shows much less hours played than in reality. For example, I have a new account, which has always been public, on it played 20+ hours in L4D2, and when i connect it says that only 6 hours and 10 minutes played.

Quote:

Originally Posted by PVNDV (Post 2803534)
Oh shiy, didn't notice that Rip is not loaded by the server, sorry

How did you do that? Do you manually load the extension by console command every time? Is there any way to automate this?

Silvers 05-26-2023 06:47

Re: [L4D & L4D2] GameTime Announcer <fork> v2.0 [8-February-2023]
 
This plugin should have:
PHP Code:

#include <ripext> 

Then the extension will load without having to manually load it.

You can make that change to the script, and recompile the plugin with the ripext.inc include file to make it work.

Mika Misori 05-27-2023 06:24

Re: [L4D & L4D2] GameTime Announcer <fork> v2.0 [8-February-2023]
 
Quote:

Originally Posted by Silvers (Post 2805034)
This plugin should have:
PHP Code:

#include <ripext> 

Then the extension will load without having to manually load it.

You can make that change to the script, and recompile the plugin with the ripext.inc include file to make it work.

Thanks for the help, I will try

Quote:

Originally Posted by NoroHime (Post 2803530)
make sure you already installed Rest in Pawn?

Extension still shows at least half the amount of time played than what is actually in the profile. Even on a fully public profile that was never private.

NoroHime 05-27-2023 15:13

Re: [L4D & L4D2] GameTime Announcer <fork> v2.0 [8-February-2023]
 
Quote:

Originally Posted by Mika Misori (Post 2805089)
Thanks for the help, I will try



Extension still shows at least half the amount of time played than what is actually in the profile. Even on a fully public profile that was never private.

yes here 2 ways to getting game time, to prevent too many message on screen, plugin design a feature can prefer only one way.
steam profile included idle time and the time not playing. so they always longer than achievement stats.
player maybe profile public, but achievement not 100% sure to access then this feature very important to getting game time.
PHP Code:

// which query is prefer, if got once then dont announce another, 1=steam profile 2=achievement stats 0=display every
gametime_prefer "2" 

if set to profile prefer. plugins also requesting achievement stats, when profile asserted cannot fetch, achievement stats finally appear to screen.

Quote:

update
changelog
  • v2.0.1 (8-March-2023)
    - fix delay authorization cause gametime display not work
  • v2.0.2 (28-May-2023)
    - fix RESTInPawn extension not load automatically, thanks to Silvers


snapslide 06-07-2023 12:08

Re: [L4D & L4D2] GameTime Announcer <fork> v2.0.2 [28-May-2023]
 
Why can't we set the game time to be displayed only on the first connection instead of every map change?:cry:


All times are GMT -4. The time now is 17:46.

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