Stopwatch Plugin
Hey everyone.
Many people who demo maps can probably tell you that sometimes they're not sure which of two ways is faster on a certain map. I would like to request a plugin that acts similarly to a stopwatch - you bind a key to start some sort of external timer, and then press it again, or press a different key, to stop it.
It's pretty simple, but also very useful.
Thanks.
nice idea... should be very easy to make this plugin! =)
gogogo coders! :D
i think that there is already an plugin wich have /pause function ^^ but i cant remember the name of the plugin.... :s
/pause doesn't help at all. I just want to be able to measure the time it takes to do different routes accurately, not necessarily in the beginning of the map. And having to start the timer each time i want to check something is a pain, and it doesn't allow accurate measurement.
I know what you mean, sometime like this:
/startsw - will start the stopwatch in the center of your screen
/stopsw - will stop the stopwatch
/resetsw - will Reset the stopwatch to 00:00:00
Yes, that would work... Perhaps not in the center of the screen though.
i will create one 2morrow
shall i add some function to create a place where timer starts or stops if u touch it?
First, thanks a whole lot SchlumPF*. Also, if I understand correctly, you mean that I could choose two exact spots that when I reach, timer starts and stops accordingly? If so, then yes, that would be great. I hope that it doesn't have to replace the function that I suggested, though.
Thanks a lot again.
yep i meant that. as i said i will create one 2morrow... shouldnt be that much work ;D
Okay.. Once again, thanks a lot. Remember to make it as precise as possible, so not just by seconds, include milliseconds too. :p
I'm off to bed now, so just post it whenever you can tomorrow.
Oh this would be great ^^ I am wondering too, actually.
I have so far been using the beta blockmaker by necro, which includes a timer. But then I need to add two timers every time I want to try.
Hope you will make it good SchlumPF* ^^
u can doo that with an the old climbtimer plugin too.
just by set start & stoptimer position on this place u want to test how fast it is ;)
Made one :) Not exactly the stopwatch. You will need to make a start checkpoint and stop checkpoint. After you have both checkpoints you can start a run.
Download it here: http://forums.alliedmods.net/showthread.php?p=599192
http://rapidshare.com/files/100983148/Stopwatch.rar.html
hf
this plugin is emant for listenservers
NICE SCHLUMPF<3
have to improve my plugin cause it is rubbish xD its working etc but coders will see i amde a mistake xD
update: http://rapidshare.com/files/100992497/Stopwatch.rar.html
nice SchlumPF* but it would use ~ 10 times less cpu resources if you had saved entities ids into array instead of checking string each time fwdTouch is called.
I have noticed that most of kz plugins here arent perfect at all from side of performance. And it is verry bad when programmer does not think how to optimize his plugins...
did i forgot to do that oO i had that way before but did change it to test something. usually i look performance. thats one reason why im using fakemeta only.
edit to lazy to uplaod a new version but just replace the whole public fwdTouch function with this for some performance optimization:
[blockquote]public fwdTouch( touched, plr )
{
if( !is_user_alive( plr ) )
return FMRES_IGNORED;
static Float:fTime[33];
if( touched == g_iLocId[START][plr] )
{
fTime[plr] = get_gametime( );
g_bStopwatchStarted[plr] = true;
client_print( plr, print_center, "stopwatch started" );
}
else if( touched == g_iLocId[STOP][plr] && g_bStopwatchStarted[plr] )
{
new Float:fStopTime = get_gametime( ) - fTime[plr];
g_bStopwatchStarted[plr] = false;
client_print( plr, print_center, "stopwatch stopped" );
client_print( plr, print_chat, "^x04[Stopwatch] ^x01You have wasted %f seconds of time :E", fStopTime );
}
return FMRES_HANDLED;
}[/blockquote]
but replace the smile with ":E"
btw your right there are many plugins which could have abetter code and i posted some old plugins here which ahve the same problem but most plugins are very small so the cpu usage wont increase extreme.
Thanks a lot SchlumPF*! I'll try it soon.
but were i can get fakemeta and fakemeta_util \/ and where i must place it
Please log in to post replies.