Advertisement
Noneatme

Untitled

Dec 29th, 2013
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.68 KB | None | 0 0
  1. -- ///////////////////////////////
  2. -- ///// RequestDownload    //////
  3. -- ///// Returns: void      //////
  4. -- ///////////////////////////////
  5.  
  6. function DownloadManager:RequestDownload(player, tblDownload)
  7.     local bytes = 0;
  8.     for index, path in pairs(tblDownload) do
  9.         bytes = bytes+string.len((self.dataTable[path] or "false"))
  10.     end
  11.     triggerClientEvent(player, "onDownloadManagerGetTotalBytes", player, bytes);
  12.    
  13.     for index, path in pairs(tblDownload) do
  14.         triggerLatentClientEvent(player, "onDownloadManagerStartDownload", self.bytesPerSecond, false, player, path, (self.dataTable[path] or "false"))
  15.     end
  16.    
  17.     triggerClientEvent(player, "onDownloadManagerFinnishDownload", player);
  18.    
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement