OnVehicleStreamOut: Difference between revisions
From Onset Developer Wiki
No edit summary |
Added an example, description, and vehicle events tag. |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Info|Event|Server & Client|1.0}} | {{Info|Event|Server & Client|1.0}} | ||
{{FuncDescription| | {{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 == | ||
<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}} | ||
{{ | {{VehicleEvents}} |
Latest revision as of 22:50, 15 January 2020
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)