OnVehicleStreamOut

From Onset Developer Wiki
Revision as of 22:50, 15 January 2020 by Chloe (talk | contribs) (Added an example, description, and vehicle events tag.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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