Jump to content

DOWNLOADER BUG


Snakegold

Recommended Posts

hello this is a downloader server side script 
 

local modsSize = 0

local queue = {}



addEventHandler("onResourceStart", resourceRoot,

function()

  local xml = xmlLoadFile("files.xml")

  for i, node in ipairs(xmlNodeGetChildren(xml)) do

      local file = xmlNodeGetAttribute(node, "path")

	  local model = xmlNodeGetAttribute(node, "model") or false

	  local name = xmlNodeGetAttribute(node, "name")

      local openedFile = fileOpen(file)

      local size = fileGetSize(openedFile)

      modsSize = modsSize + size

      table.insert(queue, {file, model, size, name})

      fileClose(openedFile)

  end

  xmlUnloadFile(xml)

	for i,v in ipairs(getElementsByType("player")) do

		triggerLatentClientEvent(v,"Downloader:StartDownload",v,queue,modsSize)

		setElementData(v,"Activity","Downloading")

	end

end

)



function download()

	triggerLatentClientEvent(source,"Downloader:StartDownload",source,queue,modsSize)

	setElementData(source,"Activity","Downloading")

end

addEventHandler("onPlayerLogin",root,download)

the error is the weapons sounds and explosion sounds are not working in the server
this is the files.xml sounds part
 

	<file path="files/sounds/explosions/explosion1.mp3" name="Sounds" />
	<file path="files/sounds/explosions/explosion2.mp3" name="Sounds" />
	<file path="files/sounds/explosions/explosion3.mp3" name="Sounds" />
	<file path="files/sounds/weapons/ak-47.wav" name="Sounds" />
	<file path="files/sounds/weapons/deagle.wav" name="Sounds" />
	<file path="files/sounds/weapons/m4.wav" name="Sounds" />
	<file path="files/sounds/weapons/mp5.wav" name="Sounds" />
	<file path="files/sounds/weapons/colt-45.wav" name="Sounds" />
	<file path="files/sounds/weapons/rifle.wav" name="Sounds" />
	<file path="files/sounds/weapons/shotgun.wav" name="Sounds" />
	<file path="files/sounds/weapons/silenced.wav" name="Sounds" />
	<file path="files/sounds/weapons/sniper.wav" name="Sounds" />
	<file path="files/sounds/weapons/tec9.wav" name="Sounds" />
	<file path="files/sounds/weapons/uzi.wav" name="Sounds" />
	<file path="files/sounds/weapons/sawed-off.wav" name="Sounds" />
	<file path="files/sounds/weapons/spaz-12.wav" name="Sounds" />

 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...