View Single Post
  #2  
Old 08-28-2011, 11:50 AM
Tricxta Tricxta is offline
The Muffin Man
Tricxta's Avatar
Join Date: Oct 2010
Location: Australia
Posts: 563
Tricxta is just really niceTricxta is just really nice
basically have a counter:

PHP Code:
function onPlayerenters()
{
  
settimer(0.05);
}

function 
onTimeout()
{
  if (
keydown2(keycode("f"),true) && this.speed<this.topspeed)this.speed++;
  else 
this.speed-=0.25;
  
settimer(0.05);

I dont think I've used valid syntax for keydown2 but I can't remember what works and what not o_0, hopefully this will give you an idea on how to do it. But you could always post your script then one of us can examine it and tell you what the problem is lol , its most likely that you not having the script take a break after the key is pressed. So pop into your script
PHP Code:
sleep (0.05); 
after your speed increment statement
Reply With Quote