JustP Posted April 11, 2019 Share Posted April 11, 2019 السلام عليكم انا سويت الكود هذا إنو السيارة تتحرك لكن ابيها توقف عند الاحداثيات الي انا حاطها بس كيف؟ local targetPosition = Vector3(-2433.95313, -587.70642, 131.44446) function createAnalogControlTest( ) local playerPosition = Vector3( getElementPosition( localPlayer ) ) local theVehicle = createVehicle( 522, playerPosition ) local thePed = createPed( 0, playerPosition ) warpPedIntoVehicle( thePed, theVehicle ) setPedAnalogControlState( thePed, "accelerate", 0.05 ) local currentPosition = Vector3(getElementPosition(theVehicle)) local direction = (targetPosition - currentPosition) setPedAnalogControlState( thePed, "accelerate", 0.5 ):direction() end addCommandHandler( "analogcontroltest", createAnalogControlTest ) Link to comment
KillerX Posted April 12, 2019 Share Posted April 12, 2019 16 hours ago, Sub[Z]ero said: السلام عليكم انا سويت الكود هذا إنو السيارة تتحرك لكن ابيها توقف عند الاحداثيات الي انا حاطها بس كيف؟ local targetPosition = Vector3(-2433.95313, -587.70642, 131.44446) function createAnalogControlTest( ) local playerPosition = Vector3( getElementPosition( localPlayer ) ) local theVehicle = createVehicle( 522, playerPosition ) local thePed = createPed( 0, playerPosition ) warpPedIntoVehicle( thePed, theVehicle ) setPedAnalogControlState( thePed, "accelerate", 0.05 ) local currentPosition = Vector3(getElementPosition(theVehicle)) local direction = (targetPosition - currentPosition) setPedAnalogControlState( thePed, "accelerate", 0.5 ):direction() end addCommandHandler( "analogcontroltest", createAnalogControlTest ) موضوعك مكرر @N3xT Link to comment
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