KostyanR Posted February 16, 2017 Share Posted February 16, 2017 Skin Shader from player can not see the other players, how to synchronize Shader Skin on the player saw the other players? Link to comment
Addlibs Posted February 16, 2017 Share Posted February 16, 2017 (edited) You'd have to route the call to apply shaders through the server and broadcast it to all clients (and clients who join afterwards) Example: -- client triggerServerEvent("announceEnableShader", localPlayer, some_data) -- place this whereever you enable the shader instead of enabling it. This announces the client's intentions to the server and the server broadcasts this to all clients (including this client) and these clients all enable the shader on their end addEvent("broadcastEnableShader", true) -- allow remotely triggered (from server) addEventHandler("broadcastEnableShader", root, function(some_data) -- receive broadcast from the server -- engineApplyShaderToWorldTexture or whatever you want. Source of this event is the player who announced the shader (so you can know which element to apply a shader to, for example) end ) -- server addEvent("announceEnableShader", true) -- allow remotely triggered (from client) addEventHandler("announceEnableShader", root, function (some_data) -- receive announcement from client triggerClientEvent(root, "broadcastEnableShader", source, some_data) -- broadcast it to all clients (all children of root) end ) Edited February 16, 2017 by MrTasty 2 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now