Doongogar Posted May 25, 2023 Posted May 25, 2023 you can use getElementSpeed or getElementVelocity 1
Firespider Posted May 29, 2023 Author Posted May 29, 2023 why deosn't working? addEventHandler("onClientElementColShapeHit", root, function(hitElement, matchingDimension) if hitElement == localPlayer and getElementType(source) == "vehicle" then local vehicleID = getElementModel(source) local speedX, speedY, speedZ = getElementVelocity(source) local actualSpeed = (speedX^2 + speedY^2 + speedZ^2)^(0.5) local Limit = 1 local kmh = actualSpeed * 180 outputChatBox(kmh) if not disableVehs[vehicleID] then if kmh < Limit then outputChatBox("d") end end end end )
DiSaMe Posted May 31, 2023 Posted May 31, 2023 onClientElementColShapeHit event doesn't trigger for vehicles, only colshapes. You must be looking for onClientVehicleCollision.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now