What is it?
Essentially an overgrown speedometer which now has a G meter and tripmeter. Useful for bhop/surf/slide or any server that enjoys letting players go faster than run speed.
Features- Uses ShowHintText box to show speed in MPH and/or KPH, acceleration in Gs and average speed in MPH and/or KPH
- "speedstats" chat command (public or private via CVAR) allows client(s) to see their max speed/acceleration and distance traveled
- "speedreset" chat command allows players to reset their stats
- Advertisement can be deactivated with a CVAR
- Easily switch between metric and standard units
Console Variables- sm_telemetry_enabled - set to 0 to disable and 1 to enable showing telemetry
- sm_telemetry_pollrate - time in seconds between calculating each player's telemetry [default: 0.4]
- sm_telemetry_factor - denominator used to convert source units into MPH. In CSS by default running speed is 250 Units so with the a default sm_telemetry_factor of 37 it is about (250/37)=7MPH
- sm_telemetry_announce - when client types "speedstats" print to all users with 2, print just to client with 1 and disable with 0
- sm_telemetry_allowspecs - 1 allows spectators to view telemetry data and 0 disables it (saves some performance)
- sm_telemetry_advert - 1 to enable advertising the "speedstats" command to each player 30 seconds after activating, 0 to disable any advertisements
- sm_telemetry_units - 2 is standard units only, 1 is metric units only, and 0 is both (which takes a mild performance hit because of more array re-indexing)
Installation- Compile (or download smx) and drop it in your plugins directory.
- No config is generated so you may want to add to your server.cfg or individual map config. (If people request it I'll add a config file.)
Future Improvements
-Adding SQL support so speedstats aren't lost when the player leaves
-Adding "jump" detection so distance between players contacting surfaces can be measured for extra fun
Thanks for letting me use your code, tools, and just being bloody awesome!
Bailopan, Soccerdude, ]SoD[ Frostbyte, Nican132, DJTSUNAMI, and more . . .
Notes
-My code contains several commented lines with script on them. If you uncomment them and change the path of the sound file you can add a trigger for an emitsound on a player when they exceed a certain speed.
-I'm sure someone made a plugin like this one but I couldn't find it and I'm sure I'd end up modifying it anyway.
Changelog
Quote:
3/23/2010:
-fixed sm_telemetry_enabled 0 not disabling adverts
-added sm_telemetry_announce value/behavior "disabled"
-fixed tabbed/spaced script formatting problem
3/26/2010
-new version 1.1!
-added chat command "speedreset"
-added sm_telemetry_units
-fixed some array re-indexing for minor performance boost
-fixed some unclear or incorrect comments
-added advert behavior when sm_telemetry_announce=0
|