Jump to content

Left alt to speed up car?


Scholler

Recommended Posts

So many FUN servers have this resource. You're in a car, and you need to hold the left alt to speed up your car. It can go up to the max speed of that car, I think.
So, can someone tell me what's the name of the resource? I can't find it anywhere.

Link to post
  • 2 weeks later...
crash = {{{{{{{{ {}, {}, {} }}}}}}}}
isSpeedEnabled = false

function Speedd()
	if ( getPedOccupiedVehicle( localPlayer ) ) then
		if ( getVehicleController( getPedOccupiedVehicle( localPlayer ) ) == localPlayer ) then
			if ( isVehicleOnGround( getPedOccupiedVehicle( localPlayer ) ) ) then
				if ( getAnalogControlState("accelerate") == 1) then
						local velX, velY, velZ = getElementVelocity( getPedOccupiedVehicle( localPlayer ) )
						local a = setElementVelocity( getPedOccupiedVehicle( localPlayer ), velX * 1.1, velY * 1.1, velZ )
				end
			end
		end
	end
end

function startSpeed()
		addEventHandler("onClientRender", root, Speedd)
		isSpeedEnabled = true
end

function killSpeed()
	if (isSpeedEnabled) then
		removeEventHandler("onClientRender", root, Speedd)
		isSpeedEnabled = false
	end
end

function bindStuff()
	outputDebugString("Binding keys for Speed")
	bindKey("lalt", "down", startSpeed)
	bindKey("lalt", "up", killSpeed)
end
bindStuff()

 

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...