Raised This Month: $ Target: $400
 0% 

[L4D & L4D2] GameTime Announcer <fork> v2.0.2 [28-May-2023]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Plugin ID:
8380
Plugin Version:
2.0.2
Plugin Category:
Statistical
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    8 
    Plugin Description:
    announce profile game time for every player
    Old 02-07-2023 , 15:11   [L4D & L4D2] GameTime Announcer <fork> v2.0.2 [28-May-2023]
    Reply With Quote #1

    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
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_gametime.sp - 686 views - 18.6 KB)
    File Type: txt l4d_gametime.phrases.txt (921 Bytes, 476 views)
    __________________

    Last edited by NoroHime; 05-27-2023 at 17:24.
    NoroHime is offline
    PVNDV
    Member
    Join Date: Mar 2015
    Old 04-28-2023 , 06:55   Re: [L4D & L4D2] GameTime Announcer <fork> v2.0 [8-February-2023]
    Reply With Quote #2

    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
    PVNDV is offline
    NoroHime
    Veteran Member
    Join Date: Aug 2016
    Location: bed
    Old 04-28-2023 , 08:31   Re: [L4D & L4D2] GameTime Announcer <fork> v2.0 [8-February-2023]
    Reply With Quote #3

    Quote:
    Originally Posted by PVNDV View Post
    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?
    __________________
    NoroHime is offline
    PVNDV
    Member
    Join Date: Mar 2015
    Old 04-28-2023 , 08:36   Re: [L4D & L4D2] GameTime Announcer <fork> v2.0 [8-February-2023]
    Reply With Quote #4

    Quote:
    Originally Posted by NoroHime View Post
    make sure you already installed Rest in Pawn?
    Yes, installed first
    PVNDV is offline
    PVNDV
    Member
    Join Date: Mar 2015
    Old 04-28-2023 , 08:52   Re: [L4D & L4D2] GameTime Announcer <fork> v2.0 [8-February-2023]
    Reply With Quote #5

    Quote:
    Originally Posted by NoroHime View Post
    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)

    Last edited by PVNDV; 04-28-2023 at 08:56.
    PVNDV is offline
    Mika Misori
    Senior Member
    Join Date: Sep 2022
    Old 05-22-2023 , 13:43   Re: [L4D & L4D2] GameTime Announcer <fork> v2.0 [8-February-2023]
    Reply With Quote #6

    Quote:
    Originally Posted by NoroHime View Post
    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 View Post
    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?

    Last edited by Mika Misori; 05-26-2023 at 07:55.
    Mika Misori is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 05-26-2023 , 07:47   Re: [L4D & L4D2] GameTime Announcer <fork> v2.0 [8-February-2023]
    Reply With Quote #7

    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.
    __________________
    Silvers is offline
    Mika Misori
    Senior Member
    Join Date: Sep 2022
    Old 05-27-2023 , 07:24   Re: [L4D & L4D2] GameTime Announcer <fork> v2.0 [8-February-2023]
    Reply With Quote #8

    Quote:
    Originally Posted by Silvers View Post
    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 View Post
    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.
    Mika Misori is offline
    NoroHime
    Veteran Member
    Join Date: Aug 2016
    Location: bed
    Old 05-27-2023 , 16:13   Re: [L4D & L4D2] GameTime Announcer <fork> v2.0 [8-February-2023]
    Reply With Quote #9

    Quote:
    Originally Posted by Mika Misori View Post
    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
    __________________

    Last edited by NoroHime; 05-27-2023 at 17:25.
    NoroHime is offline
    snapslide
    BANNED
    Join Date: Aug 2020
    Location: Usa
    Old 06-07-2023 , 13:08   Re: [L4D & L4D2] GameTime Announcer <fork> v2.0.2 [28-May-2023]
    Reply With Quote #10

    Why can't we set the game time to be displayed only on the first connection instead of every map change?
    snapslide is offline
    Send a message via ICQ to snapslide Send a message via AIM to snapslide Send a message via Yahoo to snapslide Send a message via Skype™ to snapslide
    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 18:08.


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