skuskap5 Posted December 7, 2014 Share Posted December 7, 2014 Witam, chciałbym za pomocą ID elementu w tabeli odnaleźć jego wartość Oto skrypt (serverside): tablica = {} function createTeam(name, player) table.insert(tablica, {name, player}) return #tablica end function addPlayerToTeam(teamID, playerID) local name = getTeamByID(teamID) end function getTeamByID(teamID) -- nie wiem jak sprawdzic nazwe majac id end Link to comment
Bober Posted December 8, 2014 Share Posted December 8, 2014 function getTeamByID(teamID) return tablica[teamID][1] end Chyba o to chodziło Link to comment
skuskap5 Posted December 9, 2014 Author Share Posted December 9, 2014 Tak oto chodziło, dzięki bardzo 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