NoNameSet Posted July 30, 2017 Share Posted July 30, 2017 Hi, I have been quite busy learning c# the past few months, I am creating a callout for lspdfr and I am stuck with a problem. I am trying to make the player enter the vehicle as a passenger and already have a ped on the driver seat, but when the player get's in, he pushes the ped out. is there any way around this? thanks. what I have tried: (btw am using RagePluginHook as a reference for the code) Pilot.Tasks.EnterVehicle(Airplane, -1); Game.LocalPlayer.Character.Tasks.EnterVehicle(Airplane, 3000, 0, 10, EnterVehicleFlags.None); asking if there is a native function that blocks the player from entering the driver seat or just makes him stay in the passenger seat. Link to comment Share on other sites More sharing options...
ins1de Posted July 31, 2017 Share Posted July 31, 2017 SET_VEHICLE_UNDRIVEABLE(Vehicle vehicle, BOOL toggle) // 8ABA6AF54B942B95 48D02A4E is what you need. NoNameSet 1 Link to comment Share on other sites More sharing options...
NoNameSet Posted August 1, 2017 Author Share Posted August 1, 2017 omg, thank you so much. ins1de, I actually have a question for a friend, would you know any native function that get's a ped to follow the player(k-9) sure I saw a few commands but they make the ped stop if they get to a certain distance to the target. Link to comment Share on other sites More sharing options...
ins1de Posted August 1, 2017 Share Posted August 1, 2017 omg, thank you so much. ins1de, I actually have a question for a friend, would you know any native function that get's a ped to follow the player(k-9) sure I saw a few commands but they make the ped stop if they get to a certain distance to the target. Sure, you can add him as a ped group member ('bodyguard') or just task him to go to your position every 500-1000miliseconds. GET_PLAYER_GROUP // returns the player group IDSET_PED_AS_GROUP_MEMBER // add the ped to player group If you don't want him to be in the player's ped group, you can use TASK_GO_TO_ENTITYTASK_GO_STRAIGHT_TO_COORDTASK_FOLLOW_TO_OFFSET_OF_ENTITY Just play with the different parameters until you find the one you like. Note : those native only allow the ped to follow the player on foot, it won't react if the player gets attacked or if he enters a car. NoNameSet 1 Link to comment Share on other sites More sharing options...
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