Raised This Month: $12 Target: $400
 3% 

[CS:S/?] Speedometer v1.0.6 (Updated: 8/27/12)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Plugin ID:
2033
Plugin Version:
1.0.6
Plugin Category:
Gameplay
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    10 
    Plugin Description:
    Displays a users current velocity, with the ability to derive real-world units.
    Old 10-27-2010 , 17:49   [CS:S/?] Speedometer v1.0.6 (Updated: 8/27/12)
    Reply With Quote #1

    Description:
    • Provides functionality to print out a user's current speed, with the ability to derive real-world units or any unit you wish to display.
    • (Previously approved by asherkin; reapproved to update version cvar)
    Features:
    • Provides functionality for printing out a user's current velocity into one of three separate areas: center area, hint area, or key hint area.
    • Provides optional functionality for determining who the fastest player is each round.
    • Provides clientpref functionality to save speedometer settings.
    • Commands sm_meter and sm_speedometer to toggle speedometer display.
    • Translation support.
    • Ability to derive real world values from in-game units, so you can actually see a player's MPH or FPS.
      • This plugin works under the assumption that a "hammer unit" is roughly an inch, so all conversions should be made under the assumption of inches per second.
    • Supports running during OnGameFrame, for the most precise results, or every 0.1 to 2.0 seconds per user configuration.
    ConVars:
    • sm_speedometer_method: Determines plugin functionality. (-1 = OnGameFrame(), 0 = Disabled, 0.1 <-> 2.0 = Refresh Delay)
    • sm_speedometer_factor: Optional numerical value that can be used to derive real world units from in-game velocity. Default: \"0.0\"
    • sm_speedometer_area: Determines printing area functionality. (0 = Hint, 1 = Center, 2 = Hud Hint* (Note: May be CPU intensive))
    • sm_speedometer_fastest: If enabled, the player with the highest velocity will be displayed at the end of the round.
    • sm_speedometer_default: If enabled, new clients will start with the speedometer enabled.
    Installation:
    • Place sm_speedometer.smx within /sourcemod/plugins/
    • Place sm_speedometer.phrases.txt within /sourcemod/translations/
    Notice:
    • If you are experincing a "swish" noise with sm_speedometer_area set to 0, please ensure sv_hudhint_sound is set to 0 in your server configuration file.
    Attached Files
    File Type: sp Get Plugin or Get Source (sm_speedometer.sp - 6826 views - 15.2 KB)
    File Type: txt sm_speedometer.phrases.txt (1,006 Bytes, 3820 views)
    __________________

    Last edited by thetwistedpanda; 08-28-2012 at 11:07.
    thetwistedpanda is offline
    GrO
    Veteran Member
    Join Date: Jun 2010
    Location: Poland
    Old 10-28-2010 , 03:20   Re: [CS:S] Surfing Speedometer
    Reply With Quote #2

    Thanks for another useful/fun plugin.
    __________________
    GrO is offline
    Peace-Maker
    SourceMod Plugin Approver
    Join Date: Aug 2008
    Location: Germany
    Old 10-28-2010 , 12:18   Re: [CS:S] Surfing Speedometer
    Reply With Quote #3

    Yours got more configuration options than this one, but i'd like to see the format cvar more dynamic like using {speed} as an replacer and allow using "Speed: {speed} mph" to add the unit.
    __________________
    Peace-Maker is offline
    thetwistedpanda
    Good Little Panda
    Join Date: Sep 2008
    Old 10-28-2010 , 12:28   Re: [CS:S] Surfing Speedometer
    Reply With Quote #4

    Hmm, that'll add a few more calls to the plugin which may reduce it's ability to be used in OnGameFrame, but I'll give it a shot.
    __________________
    thetwistedpanda is offline
    thetwistedpanda
    Good Little Panda
    Join Date: Sep 2008
    Old 10-28-2010 , 12:53   Re: [CS:S] Surfing Speedometer
    Reply With Quote #5

    Version 1.0.1 Released! Anyone running the plugin prior will either have to delete their sm_surfing_meter.cfg and restart their server, or manually add the {SPEED} parameter to the sm_surfing_meter_format cvar. {SPEED} denotes where the velocity appears, and if you do not have it, no messages will be printed.
    __________________
    thetwistedpanda is offline
    Xp3r7
    SourceMod Donor
    Join Date: Jul 2006
    Old 10-29-2010 , 00:43   Re: [CS:S] Surfing Speedometer
    Reply With Quote #6

    I like the idea in that thread Peace-Maker linked to of displaying the the name of the fastest person on round end.

    Would be another nice addition to this plugin!

    Maybe in chat?
    __________________
    Xp3r7 is offline
    Send a message via MSN to Xp3r7
    bobbobagan
    SourceMod Donor
    Join Date: May 2007
    Location: New Zealand
    Old 10-29-2010 , 00:47   Re: [CS:S] Surfing Speedometer
    Reply With Quote #7

    Yeh I also like the idea above & being able to choose MPH or KM's since that is something more people can relate to.

    Nice work on the plugin, I will use it on my surf server

    In the original post it says Game: Counter-Strike: Source, however this could also be used on TF2 couldn't it? I don't see any specific CS:S code, nor did you include cstrike.inc file
    __________________
    bobbobagan is offline
    Send a message via Skype™ to bobbobagan
    thetwistedpanda
    Good Little Panda
    Join Date: Sep 2008
    Old 10-29-2010 , 01:01   Re: [CS:S] Surfing Speedometer
    Reply With Quote #8

    @ Xp3r7, I'm fairly certain that would be incredibly easy to implement. Simply put, all it would require is a check in the display feature to see if the current user's velocity is higher than the last recorded velocity, and if so, store it. I don't think the performance impact would be anything to worry about since Surf servers generally don't have a lot going on.

    @ bobbobagan, this plugin already supports the needed methodology required to display MPH or KM; you will, however, need to do a little math. It's safe to assume that a hammer unit is roughly an inch, so you can simply do a conversion from inches per second, to miles per hour or kilometers per hour. It won't be 100% accurate, but you probably won't get much better. Excuse the math lesson, but this may be useful for anyone wanting to figure out what needs to be done.

    There are 12 inches per foot, and 5280 feet per mile, so that's (12 * 5280) inches per mile. Since there are 3600 seconds in an hour, you come up with the following formula: 1mph = (12 * 5280) / 3600. That works out to 17.6 inches per second. Likewise, there are (12 * 3280) feet per kilometer, so you end up with a value of 1 kmh = 10.93 inches per second. So, with that information, you can do the following:
    PHP Code:
    sm_surfing_meter_factor "17.6" //MPH
    //sm_surfing_meter_factor "10.93" //KMH
    sm_surfing_meter_format "Speed: {SPEED} MPH"
    //sm_surfing_meter_format "Speed: {SPEED} KMH" 

    At least, I believe that's right. I'm a little to drunk to be messing with numbers. I can't run TF2 on this crap computer so I don't know if it'll work, but the only requirement is clientprefs iirc.
    __________________

    Last edited by thetwistedpanda; 10-29-2010 at 02:06.
    thetwistedpanda is offline
    thetwistedpanda
    Good Little Panda
    Join Date: Sep 2008
    Old 10-29-2010 , 01:49   Re: [CS:S/TF2] Surfing Speedometer
    Reply With Quote #9

    Version 1.0.2 released! It changes the default plugin prefix to Speedometer, rather than Surfing, and adds the feature requested by Xp3r7. The cvar sm_surfing_meter_fastest will enable/disable the fastest player feature, and the cvar sm_surfing_meter_message will allow you to customize the message that is displayed based on your current settings.

    Version 1.0.3 released! Fixed a small mistake in resetting the fastest variables, didn't take into consideration other units may be used.
    __________________

    Last edited by thetwistedpanda; 10-29-2010 at 01:55.
    thetwistedpanda is offline
    Vycor
    New Member
    Join Date: Nov 2010
    Old 11-07-2010 , 04:09   Re: [CS:S/TF2] Surfing Speedometer
    Reply With Quote #10

    I seem to be having an issue. I'm using this for TF2 and while it seems to work fine when I enabled all the commands manually, when I add it to my server.cfg it doesnt seem to run the commands. I've tried putting it in the middle, at the end, etc... but nothings working. I even copy/pasted each line one by one into my console to verify everything was typed right, which it was... any ideas why its not working via server.cfg - I don't have much in there really... heres what I have:

    Code:
    sm_surfing_meter "-1"
    sm_surfing_meter_factor 17.6
    sm_surfing_meter_format "Speed: {SPEED} MPH"
    sm_surfing_meter_area 1
    Vycor is offline
    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 08:16.


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