Hallöle, ich hab ein Problem mit einer HTTP Request.
Bei mir kreuzen die Fehler auf. Er möchte einfach nicht die Map Musik Abspielen, ich habe das gefühl, das es daran liegt wenn man die Seite aufruft sich auf der Seite einloggen muss. Es sieht sehr stark danach aus, "http://78.46.102.254:22005/vitaStream/dm.mp3" Funktioniert mit dem Code einwand frei, da ist kein login nötig. Bei mir jedoch schon!.
Externer Inhalt
i.imgur.com
Inhalte von externen Seiten werden ohne Ihre Zustimmung nicht automatisch geladen und angezeigt.
Lua
while true do
local xmlNode = xmlFindChild ( metaXML, "file", i)
if not xmlNode then
break
else
local copyFile = xmlNodeGetAttribute(xmlNode, "src")
--Check if the file has been already added to the meta.xml - Some mappers are so stupid to add scripts 2 times which can fail ;)
local metaLineExists = false
for i,v in ipairs(temporaryTable) do if v == copyFile then metaLineExists = true end end
if metaLineExists == false then
if ( string.find(copyFile, ".mp3" ) ) then
gMapMusicDM = true
fileCopy ( ":"..mapname.."/"..copyFile, ":vitaStream/dm.mp3", true )
else
fileCopy ( ":"..mapname.."/"..copyFile, ":vitaMapDM/"..copyFile, true )
table.insert(gMapFilesDM, copyFile)
mapNode = xmlCreateChild(mapXML, "file")
xmlNodeSetAttribute(mapNode, "src", copyFile)
xmlNodeSetAttribute(mapNode, "download", "false")
temporaryTable[#temporaryTable+1] = copyFile
end
end
i = i + 1
end
end
Alles anzeigen
Lua
_playSound = playSound
function playSound( soundPath, looped )
if looped ~= true then looped = false end
soundPath = string.gsub(soundPath, "vita%-online%.eu", "sebihunter%.de")
soundPath = string.gsub(soundPath, "vita%.gamers%-board%.com", "sebihunter%.de")
-- local sound
-- if string.find(soundPath, "song" ) ) or ( string.find(soundPath, "music" ) ) then
--triggerEvent ( "onMapSoundReceive",getRootElement(),"http://localhost:22005/vitaStream/dm.mp3")
if string.find(soundPath, "http") then
triggerEvent ( "onMapSoundReceive",getRootElement(), soundPath)
else
triggerEvent ( "onMapSoundReceive",getRootElement(),"http://185.248.140.226:22005/vitaStream/dm.mp3")
end
sound = _playSound( "http://sebihunter.de/serverfiles/race/nothing.wav", true)
gMapSounds[#gMapSounds+1] = sound
return sound
-- else
-- sound = _playSound( soundPath, looped)
-- gMapSounds[#gMapSounds+1] = sound
-- return sound
-- end
-- return false
end
Alles anzeigen