Jump to content

مساعدة


JustP

Recommended Posts

السلام عليكم

انا سويت الكود هذا

إنو السيارة تتحرك لكن ابيها توقف عند الاحداثيات الي انا حاطها بس كيف؟

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

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