Im trying to brake the vehicle when i stop pressing the "w". Its not working
function brake()
local vehicle = getPedOccupiedVehicle(localPlayer)
local id = getElementModel ( vehicle )
if id == 432 then
setControlState ( vehicle,"handbrake", true )
end
end
bindKey ( "w", "up", brake )