Raised This Month: $32 Target: $400
 8% 

[TF2] RoundInfo


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Antithasys
Moderator
Join Date: Apr 2008
Plugin ID:
605
Plugin Version:
1.0.1
Plugin Category:
Technical/Development
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Unapprover:
    Reason for Unapproving:
    doesn't work
    Old 10-18-2008 , 19:33   [TF2] RoundInfo
    Reply With Quote #1

    TF2 RoundInfo

    Description:

    Gives information about the current round in Natives for other plugins to use.

    Features:
    • Function to return time left in a round
    • Function to return if a player switch occurred in cp and pl maps
    Commands:
    • roundtime - Returns the amount of time left in a round
    Console Variables:

    None.

    Installation:

    Place the tf2roundinfo.smx in the /sourcemod/plugins dir.
    Place the tf2roundinfo.inc in the /sourcemod/scripting/include dir.

    Changelog:
    Quote:
    1.0.1

    Fixed minor error
    Include File:
    PHP Code:
    /**
     * This will get and store the time left in the round.
     *
     * @param roundtimeleft Interget to store the time remaining
     * @return          None.
     */
    native TF2INFO_GetRoundTimeLeft(&roundtimeleft);
    /**
     * This will return true if a team switch was detected at the start of the
     * current round.  This will always return false on round end and should
     * only be called on round start.
     *
     * @param          None.
     * @return          True if a switch was detected, false if not.
     */
    native bool:TF2INFO_DidTeamsSwitch(); 
    Future Updates:

    None.

    Notes:

    I was running into situations where I needed to know if the teams has been switched on cp and pl maps. Not to mention the time remaining in the round. I found it odd that neither of these natives were in sourcemod so I went ahead and created them in this plugin.

    This plugin is really only useful to other plugins that need this information.

    The example will not compile on the forums as is only meant to show you how to use it in your own code. You can compile it yourself if you want to see the example work and make sure you have it installed correctly.
    Attached Files
    File Type: sp Get Plugin or Get Source (tf2roundinfo.sp - 953 views - 4.5 KB)
    File Type: inc tf2roundinfo.inc (901 Bytes, 394 views)
    File Type: sp Get Plugin or Get Source (tf2roundinfo_example.sp - 314 views - 589 Bytes)

    Last edited by Antithasys; 10-18-2008 at 21:35.
    Antithasys 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 07:03.


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