Hi everyone! I’m having a bit of a struggle I saw an other topic discussing about
GetIsTaskActive()
for “TaskVehiclePark()” and “TaskVehicleDriveToCoord()” and I’m trying to make a function so a bus can come near the player, park, and if the bus is park then the player can enter the bus… But I ran in two issues:
- The bus really want to park ON the player not NEAR so every time he crush the player
- I can’t seem to be able to tell the Task to wait for the bus to be stopped for the player being asked to enter it
Here’s the function:
function GoToPlayerStop(x, y, z, bus, driver, bushash)
player = GetPlayerPed(-1)
TaskVehicleDriveToCoord(driver, bus, x, y, z, 17.0, 0, bushash, drivingStyle, 1, true)
TaskVehiclePark(driver, bus, x, y, z, 5.28, 0, 60.0, true)
while (GetIsTaskActive(driver, 12)) do
Wait(100)
end
TaskEnterVehicle(player, bus, -1, 0, 1.0, 1, 0)
end
Thanks for any help you can gave
Have a great day (As you can saw my first language ain’t English and I’m still a beginner in coding…)