OnVehicleStreamOut: Difference between revisions

From Onset Developer Wiki
Created page with "{{Info|Event|Server|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|OnVehicleStreamOut}} {{FuncParameters}} == Example == __EDIT_ME__ {{RelatedFunctions}} {{ServerEvents}}"
 
Chloe (talk | contribs)
Added an example, description, and vehicle events tag.
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Info|Event|Server|1.0}}
{{Info|Event|Server & Client|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Called when a vehicle is no longer streamed for a player. The stream distance is set through your [[server_config]].}}


{{FuncSyntax|OnVehicleStreamOut}}
{{FuncSyntax|OnVehicleStreamOut(vehicle, player)}}
{{FuncSyntaxClient|OnVehicleStreamOut(vehicle)}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|vehicle|The vehicle for the other player is streamed out.}}
{{FuncParam|player|The player that streams out for vehicle.}}
== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua>
AddEvent("OnVehicleStreamOut", function(vehicle)
AddPlayerChat("Vehicle ID " .. vehicle .. " just streamed out! There's now " .. #GetStreamedVehicles() .. " vehicles streamed for you!")
end)
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
{{ServerEvents}}
{{VehicleEvents}}

Latest revision as of 22:50, 15 January 2020

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