Hugos Posted June 26, 2019 Posted June 26, 2019 Help. What function is responsible for the list of all players. To the connections to check whether the server is the player with the same name (I'm early get the player's name) Говорю на русском. Sorry for bad english.
Moderators IIYAMA Posted June 26, 2019 Moderators Posted June 26, 2019 local playerList = getElementsByType("player") https://wiki.multitheftauto.com/wiki/GetElementsByType Player names are irrelevant, the thing that matters are elements. Players are also elements. In Lua those are accessed with userdata values. Userdata's are unique values that are used as element identifiers. Take a closer look. Clientside: outputChatBox(tostring(localPlayer)) 1 Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Hugos Posted June 27, 2019 Author Posted June 27, 2019 8 hours ago, IIYAMA said: local playerList = getElementsByType("player") https://wiki.multitheftauto.com/wiki/GetElementsByType Player names are irrelevant, the thing that matters are elements. Players are also elements. In Lua those are accessed with userdata values. Userdata's are unique values that are used as element identifiers. Take a closer look. Clientside: outputChatBox(tostring(localPlayer)) Thanks! Говорю на русском. Sorry for bad english.
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