OnVehicleStreamIn: Difference between revisions
From Onset Developer Wiki
Created page with "{{Info|Event|Server|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|OnVehicleStreamIn}} {{FuncParameters}} == Example == __EDIT_ME__ {{RelatedFunctions}} {{ServerEvents}}" |
No edit summary |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Info|Event|Server|1.0}} | {{Info|Event|Server & Client|1.0}} | ||
{{FuncDescription| | {{FuncDescription|Calls when a vehicle streams out of the streaming distance set in your [[server_config]] for a player.}} | ||
{{FuncSyntax|OnVehicleStreamIn}} | {{FuncSyntax|OnVehicleStreamIn(vehicle, player)}} | ||
{{FuncSyntaxClient|OnVehicleStreamIn(vehicle)}} | |||
{{FuncParameters}} | {{FuncParameters}} | ||
{{FuncParam|vehicle|The vehicle for the other player is streamed in.}} | |||
{{FuncParam|player|The player that streams in for vehicle.}} | |||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua> | |||
AddEvent("OnVehicleStreamIn", function(vehicle) | |||
AddPlayerChat("Vehicle ID " .. vehicle .. " is now streamed for you! There are " .. #GetStreamedVehicles() .. " vehicles streamed for you!") | |||
end) | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
{{ | {{VehicleEvents}} |
Latest revision as of 15:38, 2 August 2020
Description
Calls when a vehicle streams out of the streaming distance set in your server_config for a player.
Syntax
OnVehicleStreamIn(vehicle, player)
Client Syntax
OnVehicleStreamIn(vehicle)
Parameters
- vehicle
The vehicle for the other player is streamed in. - player
The player that streams in for vehicle.
Example
AddEvent("OnVehicleStreamIn", function(vehicle)
AddPlayerChat("Vehicle ID " .. vehicle .. " is now streamed for you! There are " .. #GetStreamedVehicles() .. " vehicles streamed for you!")
end)