Jump to content

Usuario em um Element


Recommended Posts

Use a função getPlayersByData

--

function getPlayersByData (dataName)
	if dataName and type(dataName) == "string" then
		local playersTable = {}
		for i,v in ipairs(getElementsByType("player")) do
			if getElementData (v, dataName) then
				table.insert (playersTable, getPlayerName(v))
			end
		end
		if #playersTable == 0 then
			return false
		end
		return playersTable
	end
	return false
end

 

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...