koodia

7. huhtikuuta 2021 | 182 näyttökertaa

   local WaypointHandle = GetFirstBlipInfoId(8)                    
                            x,y,z = table.unpack(Citizen.InvokeNative(0xFA7C7F0AADF25D09, WaypointHandle, Citizen.ResultAsVector())) 
                            xpos = x
                            ypos = y
                            gr, ground = GetGroundZFor_3dCoord(x, y, z+1000, 0)                 
                            local veh = GetVehiclePedIsIn(PlayerPedId(), false)   
                            TaskVehicleDriveToCoordLongrange(xPlayer, veh, x, y, ground, 10.0, 1 | 2 | 4 | 8 | 16 | 128 | 256 | 786603, 20.0)
                            SetDriverAbility(PlayerPedId(), 100.0)
                            SendNotification({
                                text = "Autopilot enabled.",
                                timeout = 3000
                            })