Server

Check if the player is completely in a vehicle or not

lib.isInVehicle

lib.isInVehicle(source)

Parameters

  • source number: The client source id

Returns

  • success boolean: Whether the player is in a vehicle or not

Examples

local isInVehicle<const> = lib.isInVehicle(source)
 
if isInVehicle then
  print('You are in a vehicle')
else
  print('You are not in a vehicle')
end