Jump to content

[Issue]getElementData


Crosshair

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...