Jump to content

Gravity point


Albinix

Recommended Posts

I have read and I tried this. but i don't get it to work

local myMarker = createMarker ( 2502.6672363281, -1679.3017578125, 13.021269798279, "corona", 3, 255, 0, 0, 255 )
 
function MarkerHit( thePed )
local vehicle = getPedOccupiedVehicle ( theped )
setVehicleGravityPoint( vehicle, 0, 100, 0, 5 )
end
addEventHandler( "onMarkerHit", myMarker, MarkerHit )

Link to comment

new code but don't work either

local myMarker2 = createMarker ( 2502.6672363281, -1659.3017578125, 13.021269798279, "corona", 3, 255, 140, 0, 255 )
 
function MarkerHit2 ( player )
		local veh = getPedOccupiedVehicle(player)
		if (veh) then
			setVehicleGravityPoint( veh, 0, 0, 100, 5 )
		end
end
 
addEventHandler( "onMarkerHit", myMarker2, MarkerHit2 )

Link to comment

you need to understand the difference between server and client side scripts, you are using a server event with client functions. What you need is onClientMarkerHit

Also when using useful functions in your script you need to put the useful functions code somewhere so your script can access it.

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