Jump to content

[Help] Vehicle Pushing


Recommended Posts

Hi guys. I want when a player do handbrake then players can't Push that vehicle (just players, not other vehicles),

I have vehicle system include handbrake and ETC , just need an idea for how to make this 'Anti Vehicle Pushing'?

Link to post

try it

addEventHandler("onClientVehicleCollision", getRootElement(),function (collider,force, bodyPart, x, y, z, nx, ny, nz) 
    if collider and getElementType(collider) == "player" then
		if not isElementFrozen(source) then
			if collider ~= source then
				if not getVehicleOccupant(source,0) then
					setElementFrozen(source, true)
					setTimer(setElementFrozen, 1000, 1, source, false)
				end
			end
		end
	end
end)

 

  • Like 2
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...