Jump to content

get the original handling of an element


TrickyTommy

Recommended Posts

Hello, i want to get the original handling of all vehicles, and boost them a bit. But i can't get their speed, it returns nil! I did not understand the examples online.
 

function realHandling()
	if isTimer (checkVehicles) then killTimer (checkVehicles) end
	local checkVehicles = setTimer (function()
		vehicles = getElementsByType("vehicle")
		for k, v in pairs(vehicles) do

	    local originalHandling = getOriginalHandling(596)

		for k in pairs (originalHandling) do
			outputDebugString (tostring(k["maxVelocity"]))
		end

		if not getElementData (v, "realHandled") then
			end
		end
	end, 50, 0)
end
addEventHandler ("onResourceStart", getRootElement(), realHandling)

 

Link to comment
  • Moderators

You can ask it like this:

"Can you please make an example that shows all the cars their maximum velocity?"

But I am afraid this section isn't for English lessons my friend...

 

 

Edited by IIYAMA
  • Haha 1
Link to comment

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...