Speedometer
This plugin is NOT SAFE for recording. Do not use this plugin while being in a run. Having the plugin and not using is SAFE. -SchlumPF
Description: This plugin shows player speed when your are moving, jumping, climbing a ladder, or in air.
Cvars:
/speed - enables/disables the plugin.
speed_colors - set color off the hud msg (rrr ggg bbb)
showspeed - sets the auto showing off speed
Useful for: Kreedz servers, HNS servers, Surf servers.
Changelog:
1.2 - fixed bugs + optimized code
1.1 - added showspeed, speed_colors.
Credits:
Numb - for his LJstats, where from i have taken the code
skyjur - helping with the code
SchlumPF - helping optimize the code + taken speed_colors from his script
Download: http://forums.alliedmods.net/showthread.php?t=79278
had a quick overview:
speed = floatround(vector_length(velocity))
velocity[2] = 0.0
speedh = floatround(vector_length(velocity))
->
speed as a float instead of an int
speed = vector_length( velocity );
speedh = floatsqroot( floatpower( velocity[0], 2.0 ) + floatpower( velocity[1], 2.0 ) );
but a float with a taskintervall of 1 looks ugly :S
what about simply getting speed and showing it to player each prethink?
Hm... I will try to remake it...
SchlumPF your far to clever for a 16 year old.
Updated, read the 1st post.
for the color thingy you should have a look at my kz_stats. i just call a function on using the cmd for changing color/position of the hudmessage and store the new values in global variables.
have a look at this http://schlumpf.ampaste.net/f278aa793
%3.2f should be %.3f
new i, maxplayers = get_maxplayers()
new Float:velocity[3]
new Float:speed, Float:speedh
static colors[16], r[4], g[4], b[4]
for(i=1; i<=maxplayers; i++)
->
new g_iMaxPlayers = get_maxplayers() // gloabal variable
static i
static Float:velocity[3]
static Float:speed, Float:speedh
static colors[16], r[4], g[4], b[4]
for(i=1; i<=g_iMaxPlayers; i++)
From the weapon ulitys :D
forget about weapon_utilitys or w/e... most of them are not optimized whcih i should so...
but your plugins is trying to get colors once per second PER PLAYER = max 32 times per second. mine is called when player switches weapon which shouldnt be often unless player is spamming "lastinv" :)
Updated, read the 1st post.
good plugin, very usefull for me...
oh, a suggestion... cool if u add maxspeed too :p
Why do you need maxspeed? If you fall off a kz map eg: kzus_longwaydown i think you can do 2000+ maxspeed, so i dont know if its needed...
Please log in to post replies.