Mvrat Posted March 4, 2020 Share Posted March 4, 2020 How can i show the DXDrawImage to only local player? Link to comment
Moderators Patrick Posted March 4, 2020 Moderators Share Posted March 4, 2020 (edited) Client sided function are affects only for localPlayer, like dxDrawText. Think about it, it runs only on client's PC. But if you start this function on every client's PC, it shows for everyone, ofcourse. But then, the image is not "same", every client render her own image. Edited March 4, 2020 by Patrick Link to comment
Mvrat Posted March 4, 2020 Author Share Posted March 4, 2020 I am trying to make an intro script, image fades in on player join the server. But image fading in my and my friends client. Link to comment
Moderators Patrick Posted March 4, 2020 Moderators Share Posted March 4, 2020 (edited) 11 minutes ago, Lukas said: I am trying to make an intro script, image fades in on player join the server. But image fading in my and my friends client. You need to use events. OnClientPlayerJoin trigger the attached function when someone join to server, and you need to start the Intro Render only for this client, who is you, localPlayer. addEventHandler("onClientPlayerJoin", root, function -- Wiki note: The `source` of this event is the player that joined the server. if source == localPlayer then -- who join is you, the localPlayer -- start render end end) -- or set the source of the event to localPlayer instead of root, and then you dont need to check it who is the source. Some Lua tutorial Edited March 4, 2020 by Patrick 1 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