roriscrave
Advanced OT User
- Joined
- Dec 7, 2011
- Messages
- 1,188
- Solutions
- 34
- Reaction score
- 200
I have 2 tables, a value table and a string, is possible to make it?
the table can only contain 3 names, and the storages will be organized from largest to smallest
exemple my table are:
if a player "Noyek", have storage 900, he will be insert in the table and the new tables will be like this:
and the last player need to be removed (Newbie, 720), because table can contains only 3 players
the table can only contain 3 names, and the storages will be organized from largest to smallest
exemple my table are:
Lua:
local table = {1000, 880, 720}
local pNames = {Smavel, Quartz, Newbie}
if a player "Noyek", have storage 900, he will be insert in the table and the new tables will be like this:
Lua:
local table = {1000, 900, 880, 720}
local pNames = {Smavel, Noyek, Quartz, Newbie
and the last player need to be removed (Newbie, 720), because table can contains only 3 players
Lua:
local table = {1000, 900, 880}
local pNames = {Smavel, Noyek, Quartz}