Estou com um erro em um codigo de colisão entre veiculos, podem me ajudar?
Ele inicia tudo ok, os carros n se batem, mas ai passa uns minutos e da erro no setElementCollidableWith(vehicle, v, false)
function ghostmode_on()
local v = getPedOccupiedVehicle(localPlayer) -- Get her's Vehicle ID
for index,vehicle in ipairs(getElementsByType("vehicle")) do --LOOP through all Vehicles
setElementCollidableWith(vehicle, v, false) -- Set the Collison off with the Other vehicles.
end
end
addEventHandler( "onClientResourceStart", root, ghostmode_on)
Ai o erro: