How do you broadcast tables?

Just like when you use: PS_GetPoints() it works on any addon anywere? How do you Broadcast a table and let every other plugin use it?
Thanks if you help ~

https://github.com/adamdburton/pointshop/blob/50afa56a4bb5efc53532cdcbabf32935cb23cd1c/lua/pointshop/sv_player_extension.lua#L155-L157 and https://github.com/adamdburton/pointshop/blob/f56c271c63caea13e9f1504909e6680a65518e83/lua/pointshop/cl_player_extension.lua#L55-L57
Also, GetPoints doesn’t have anything to do with tables

[editline]14th August 2016[/editline]

All you seem to need to do is this:



local Player = FindMetaTable('Player')

function Player:WhateverFunction()
    -- blah
end


I know, but can’t we broadcast tables?

Can you be more specific on what data you’re trying to broadcast?

itemsArr = {}
itemsArr[1] = { “models/player/kleiner.mdl”, “kleiner”, “Kleiner”, “100” }
itemsArr[2] = { “models/player/odessa.mdl”, “odessa”, “Odessa”, “250” }
itemsArr[3] = { “models/player/Police.mdl”, “police”, “Police”, “500” }
itemsArr[4] = { “models/player/alyx.mdl”, “alyx”, “Alyx”, “500” }
itemsArr[5] = { “models/player/barney.mdl”, “barney”, “Barney”, “100” }

Make the table shared and network the table index.

How, this is the question?


-- Shared
local tbl = {{ "stuff" }, { "otherstuff" }, {"morestuff" }}

-- Server
local index = 5
util.AddNetworkString( "TableIndex" )

net.Start( "TableIndex" )
   net.WriteInt( index )
net.Broadcast()

-- Client
net.Receive( "TableIndex", function()
   local clienttbl = tbl[net.ReadInt()]
   -- Stuff
end )