Crosshair Posted March 14, 2013 Share Posted March 14, 2013 Hello all. Lets say some players have set an elementdata called "x" with the value "y". I need a function that gets all those players that have getElementdata(player, "x") == "y" and sends a outputChatBox to all of them. PS: I did something but i can`t test it right now since i`m the only player on the server local players = getElementsByType( "player" ) for i=1,#players do if (getElementData(players[i], "x") == "true") then outputChatBox("test", players[i]) end end Could this work ? Link to comment
Renkon Posted March 14, 2013 Share Posted March 14, 2013 for _, player in ipairs(getElementsByType("player")) do if getElementData(player, "x") then -- The guy has got that elementData end end 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