OnVehicleStreamIn: Difference between revisions
From Onset Developer Wiki
No edit summary |
Added a description, example, and related functions tag. |
||
Line 1: | Line 1: | ||
{{Info|Event|Server & Client|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(vehicle, player)}} | {{FuncSyntax|OnVehicleStreamIn(vehicle, player)}} | ||
Line 11: | Line 11: | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua> | |||
AddEvent("OnVehicleStreamOut", function(vehicle) | |||
AddPlayerChat("Vehicle ID " .. vehicle .. " has now streamed for you! There's now " .. #GetStreamedVehicles() .. " vehicles streamed for you!") | |||
end) | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
{{ | {{VehicleEvents}} |
Revision as of 07:42, 16 January 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("OnVehicleStreamOut", function(vehicle)
AddPlayerChat("Vehicle ID " .. vehicle .. " has now streamed for you! There's now " .. #GetStreamedVehicles() .. " vehicles streamed for you!")
end)