Jump to content

Sit in the hiker to the vehicle


holuzs

Recommended Posts

function pickedUpTheHiker()
    local veh = getPedOccupiedVehicle(localPlayer)
    setPedAnimation(hiker)
    setPedControlState(hiker, "enter_passenger", true)
end

The ped stop the anim, but don't in into the nearest vehicle.

Edited by holuzs
Link to comment
  • Moderators

Használd a 'enter_exit'-et, mert a 'enter_passenger'-re csak bindet tudsz tenni ami a settingsbe beállított gombhoz "illeszkedik".

 

(Use 'enter_exit', because 'enter_passenger' is an MTA hard-coded command and you can only bind a function to that.)

  • Thanks 1
Link to comment

Assuming the ped is really a ped, and not a player: peds cannot enter/exit vehicles the normal way.

Quote

setPedControlState

Client-only function
 

This function makes a ped or player press or release a certain control.

Note: You can't use enter_exit or enter_passenger on a ped.

You'll have to either warp him in the vehicle or script the animations sequence yourself and then warp him in the vehicle.

Link to comment
  • Moderators
4 minutes ago, Zorgman said:

Assuming the ped is really a ped, and not a player: peds cannot enter/exit vehicles the normal way.

You'll have to either warp him in the vehicle or script the animations sequence yourself and then warp him in the vehicle.

Oh my god... really.

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