--Lazy file transfer, loads files after the client has connected! --[[ Uses: GM.DebugLazyFileTransfer Can be: true, false GM.LazyFileTransferType Can be: lua, http GM.GAMEMODE_FOLDER_NAME Should be the folder name for the gamemode ]] if(CLIENT) then GAMEMODE.LazyFileTransferTable = {} end if(SERVER) then GM.LazyFileTransferTable = {} util.AddNetworkString("RequestLazyFile")--Called on the client util.AddNetworkString("SendLazyFile")--Called on the server end function requestLazyFile(name) end function addLazyFile(name) if(CLIENT) then return end if(GM.DebugLazyFileTransfer) then print("Adding file to be lazily transfered:") print(name) end table.insert(GM.LazyFileTransferTable,name) end if(SERVER) then net.Receive( "RequestLazyFile", function(len, ply) local partialpath = net.ReadString() local filepath = "gamemodes/" .. GM.GAMEMODE_FOLDER_NAME .. partialpath if(GM.DebugLazyFileTransfer) then print("Request for lazy file recived:") print(filepath) end local filedata = file.Open( filepath, 'r', "MOD" ) end) end