Raised This Month: $ Target: $400
 0% 

[TF2] MvM Round / Wave Reporter


Post New Thread Reply   
 
Thread Tools Display Modes
Author
DrGamez
Member
Join Date: Jan 2005
Location: Seattle
Plugin ID:
3585
Plugin Version:
1
Plugin Category:
General Purpose
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Returns the current and total waves for the current MvM game.
    Old 03-20-2013 , 15:08   [TF2] MvM Round / Wave Reporter
    Reply With Quote #1

    Simple plugin, if something is wrong let me know.
    If something is really wrong please fix it yourself.

    Code:
    sm_mvmround: Returns the current and total waves for the current MvM game.
    edit: Added a check to see if you are even playing MvM. If you aren't, plugin does nothing.
    Attached Files
    File Type: sp Get Plugin or Get Source (mvmroundreporter.sp - 1218 views - 1.3 KB)
    __________________

    Last edited by DrGamez; 03-20-2013 at 17:37.
    DrGamez is offline
    MasterOfTheXP
    Veteran Member
    Join Date: Aug 2011
    Location: Cloudbank
    Old 03-20-2013 , 15:20   Re: MvM Round / Wave Reporter
    Reply With Quote #2

    Code:
    // 1. I do not know if there is a better way to do this
    // 2. I do not care, this works.
    There isn't.

    Did you make this for players with HUDs that don't show the wave count, though? Cause I've been in a few games where someone asked what wave it was, and I say, "it's wave/maxwaves, why? Is your HUD broken?" "No, I'm using the minimalist HUD."
    __________________
    Plugins / My Steam / TF2 Sandbox (plugin beta testing!)
    MasterOfTheXP is offline
    DrGamez
    Member
    Join Date: Jan 2005
    Location: Seattle
    Old 03-20-2013 , 15:36   Re: MvM Round / Wave Reporter
    Reply With Quote #3

    Quote:
    Originally Posted by MasterOfTheXP View Post
    Did you make this for players with HUDs that don't show the wave count, though? Cause I've been in a few games where someone asked what wave it was, and I say, "it's wave/maxwaves, why? Is your HUD broken?" "No, I'm using the minimalist HUD."
    I made this for some weird niche case. I have an IRC bot that queries my servers and reports back how many people are in the server, and because we started having a "line" for our MvM, we wanted to know how long we'd have to wait for others to finish the current game, and sometimes they just don't respond if you ask them what wave they are on.
    __________________

    Last edited by DrGamez; 03-20-2013 at 15:38. Reason: Removed quoteception.
    DrGamez is offline
    Powerlord
    AlliedModders Donor
    Join Date: Jun 2008
    Location: Seduce Me!
    Old 03-20-2013 , 15:51   Re: MvM Round / Wave Reporter
    Reply With Quote #4

    I've actually been wondering if those netprops actually worked, as I've been doing some coding in MapChooser Extended that uses them but it's not done yet... have you tried this and made sure it works?
    __________________
    Not currently working on SourceMod plugin development.

    Last edited by Powerlord; 03-20-2013 at 15:51.
    Powerlord is offline
    DrGamez
    Member
    Join Date: Jan 2005
    Location: Seattle
    Old 03-20-2013 , 15:55   Re: MvM Round / Wave Reporter
    Reply With Quote #5

    Quote:
    Originally Posted by Powerlord View Post
    I've actually been wondering if those netprops actually worked, as I've been doing some coding in MapChooser Extended that uses them but it's not done yet... have you tried this and made sure it works?
    I've been using this plugin for a long while now, and before I submitted I made sure to double/triple check that it still works.

    I haven't done any extensive edge testing though, like trying this on a non MvM server for example.
    __________________
    DrGamez is offline
    Powerlord
    AlliedModders Donor
    Join Date: Jun 2008
    Location: Seduce Me!
    Old 03-20-2013 , 15:58   Re: MvM Round / Wave Reporter
    Reply With Quote #6

    Quote:
    Originally Posted by DrGamez View Post
    I've been using this plugin for a long while now, and before I submitted I made sure to double/triple check that it still works.
    Good, saves me some time having to set up an MvM server just to test it.

    Quote:
    Originally Posted by DrGamez View Post
    I haven't done any extensive edge testing though, like trying this on a non MvM server for example.
    I already figured out how to tell if a server is running MvM... either check the tf_gamemode_mvm cvar or GameRules_GetProp("m_bPlayingMannVsMachine")
    __________________
    Not currently working on SourceMod plugin development.

    Last edited by Powerlord; 03-20-2013 at 15:59.
    Powerlord is offline
    DrGamez
    Member
    Join Date: Jan 2005
    Location: Seattle
    Old 03-20-2013 , 16:01   Re: MvM Round / Wave Reporter
    Reply With Quote #7

    Quote:
    Originally Posted by Powerlord View Post
    I already figured out how to tell if a server is running MvM... either check the tf_gamemode_mvm cvar or GameRules_GetProp("m_bPlayingMannVsMachine")
    Yeah, I could put that into my plugin I guess, but this is the only bit of SourcePawn I've written so it would probably take me a bit to even look up the syntax/proper way to check/abort if untrue.

    Not that SourcePawn is moon language or anything - but it's not the most fun I've had coding.
    __________________
    DrGamez is offline
    Powerlord
    AlliedModders Donor
    Join Date: Jun 2008
    Location: Seduce Me!
    Old 03-20-2013 , 16:03   Re: MvM Round / Wave Reporter
    Reply With Quote #8

    Quote:
    Originally Posted by DrGamez View Post
    Yeah, I could put that into my plugin I guess, but this is the only bit of SourcePawn I've written so it would probably take me a bit to even look up the syntax/proper way to check/abort if untrue.

    Not that SourcePawn is moon language or anything - but it's not the most fun I've had coding.
    I just assumed you'd do this at the top of Command_MVMRound:

    PHP Code:
    if (!GameRules_GetProp("m_bPlayingMannVsMachine"))
    {
        return 
    Plugin_Handled;

    That is, assuming Valve doesn't break that netprop at some point.

    Although you could just leave your code alone, it should just display 0/0 on a non-MvM server.
    __________________
    Not currently working on SourceMod plugin development.

    Last edited by Powerlord; 03-20-2013 at 16:04.
    Powerlord is offline
    DrGamez
    Member
    Join Date: Jan 2005
    Location: Seattle
    Old 03-20-2013 , 17:20   Re: MvM Round / Wave Reporter
    Reply With Quote #9

    Alright, added the check (and tested on my pvp server) to see if you're playing MvM or not. Thanks P-P-P-Powerlord.
    __________________

    Last edited by DrGamez; 03-20-2013 at 17:26.
    DrGamez is offline
    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 19:02.


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