OnPlayerStreamIn: Difference between revisions
From Onset Developer Wiki
mNo edit summary |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
{{FuncSyntax|OnPlayerStreamIn(player, otherplayer)}} | {{FuncSyntax|OnPlayerStreamIn(player, otherplayer)}} | ||
{{FuncSyntaxClient|OnPlayerStreamIn( | {{FuncSyntaxClient|OnPlayerStreamIn(otherplayer)}} | ||
{{FuncParameters}} | {{FuncParameters}} | ||
Line 25: | Line 25: | ||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
{{ | {{PlayerEvents}} |
Latest revision as of 08:04, 16 January 2020
Description
Called when another user is streamed in (rendered) for the player.
Syntax
OnPlayerStreamIn(player, otherplayer)
Client Syntax
OnPlayerStreamIn(otherplayer)
Parameters
- player
The player for the other player is streamed in. - otherplayer
The player that streams in for player.
Example
A barebones example of syncing player clothing presets:
function OnPlayerStreamIn(player)
-- Assuming `_modelPreset` is the player's clothing preset id,
-- set their clothing so the client doesn't see them naked.
local _modelPreset = GetPlayerPropertyValue(player, "_modelPreset")
if (_modelPreset ~= nil and _modelPreset > 0) then
SetPlayerClothingPreset(player, _modelPreset)
end
end
AddEvent("OnPlayerStreamIn", OnPlayerStreamIn)
See also
- OnPlayerServerAuth
- OnPlayerSteamAuth
- OnPlayerStreamIn
- OnPlayerStreamOut
- OnPlayerJoin
- OnPlayerQuit
- OnPlayerSpawn
- OnPlayerDeath
- OnPlayerWeaponShot
- OnPlayerDamage
- OnPlayerChat
- OnPlayerChatCommand
- OnPlayerInteractDoor
- OnPlayWeaponHitEffects
- OnPlayerSwitchCamera
- OnPlayerEnterWater
- OnPlayerLeaveWater
- OnPlayerCrouch
- OnPlayerEndCrouch
- OnPlayerEndFall
- OnPlayerFall
- OnPlayerTalking