OnVehicleStreamOut

From Onset Developer Wiki
OnVehicleStreamOut

Type: Event
Context: Server & Client
Introduced: v1.0

Description

Called when a vehicle is no longer streamed for a player. The stream distance is set through your server_config.

Syntax

OnVehicleStreamOut(vehicle, player)
Client Syntax
OnVehicleStreamOut(vehicle)

Parameters

  • vehicle
    The vehicle for the other player is streamed out.
  • player
    The player that streams out for vehicle.

Example

AddEvent("OnVehicleStreamOut", function(vehicle)
	AddPlayerChat("Vehicle ID " .. vehicle .. " just streamed out! There's now " .. #GetStreamedVehicles() .. " vehicles streamed for you!")
end)

See also