Nucleus Posted September 24, 2014 Share Posted September 24, 2014 hey guys i looked around for some admin mods that would let me teleport to users but so far i had no luck.so i plan creating a nice ui that can be toggled on and off and allow eaze of teleporting to your server's player's. but so far i have no luck with getting other player information. for example i have tried using getSpecificPlayer(int player) as solocal player = getSpecificPlayer(1); --returns a nil valuelocal x = player:getX(); --of course nothing but getSpecificPlayer returns a nil/null for every playerid except for mine. i was wondering if anyone know's a way to get player coord's before i go diving head first into .class files?i did poke around alittle and found a function called getOnlinePlayers(); and was wondering if someone could give me an example of the use, i messed around with it a little and got it to fill an array. i'am not sure how i would iterate through that array and get information.thanks you Link to comment Share on other sites More sharing options...
Nucleus Posted September 25, 2014 Author Share Posted September 25, 2014 this has been solved you can use getOnlinePlayers(); the following way ( i was sooooo close) local players = getOnlinePlayers();local array_size = players:size();for i=0, array_size-1, 1 do local player = players:get(i); if player:getUsername() == "TurboTuTone" then player:Say("Hi it is I, turbo"); endend o ya and thank you turbotutone Link to comment Share on other sites More sharing options...
Connall Posted September 25, 2014 Share Posted September 25, 2014 Turbotutone, what a guy. Marked the topic solved for you. Link to comment Share on other sites More sharing options...
Nucleus Posted September 25, 2014 Author Share Posted September 25, 2014 is there any other function that grabs all players in the server, this one just seems to grab nearby/local players? Link to comment Share on other sites More sharing options...
EnigmaGrey Posted September 25, 2014 Share Posted September 25, 2014 Take a look at ISUIScoreBoard in media\lua. It displays all the players on a server in a list. Link to comment Share on other sites More sharing options...
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