Hugos Posted June 26, 2019 Share 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) Link to comment
Moderators IIYAMA Posted June 26, 2019 Moderators Share 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 Link to comment
Hugos Posted June 27, 2019 Author Share 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! 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