16.05.2011, 06:12
Try this on for size.
You'll probably want to play around with the time on the timer so he doesn't just constantly accelerate until he goes way too fast.
pawn Код:
forward BoostTime(playerid);
//When you start the boost
SetPVarInt(playerid,"BoostTime",SetTimerEx("BoostTime",2000,1,"d",playerid));
public BoostTime(playerid)
{
new
Float:x,
Float:y,
Float:z,
Float:v = GetPlayerVehicleID(playerid);
GetVehicleVelocity(v,x,y,z);
SetVehicleVelocity(v,x*1.3,y*1.3,z*1.3);
return 1;
}
//When you stop the boost
KillTimer(GetPVarInt(playerid,"BoostTime"));