diff --git a/cl_player.lua b/cl_player.lua index 29401b5..6dc8351 100644 --- a/cl_player.lua +++ b/cl_player.lua @@ -89,6 +89,25 @@ Citizen.CreateThread( function() PLY.inPassengerSeat = GetPedInVehicleSeat( PLY.veh, 0 ) == PLY.ped PLY.vehClassValid = GetVehicleClass( PLY.veh ) == 18 + Citizen.Wait( 500 ) + end +end ) + +Citizen.CreateThread( function() + while ( true ) do + if ( IsPedGettingIntoAVehicle( PLY.ped ) ) then + UTIL:Notify( "DEBUG: Player getting in vehicle" ) + local vehEntering = GetVehiclePedIsEntering( PLY.ped ) + + Citizen.Wait( 2000 ) + + local veh = GetVehiclePedIsIn( PLY.ped, false ) + + if ( veh == vehEntering ) then + UTIL:Notify( "DEBUG: Trigger sync" ) + end + end + Citizen.Wait( 500 ) end end ) \ No newline at end of file