Garry's Mod

Garry's Mod

Nombat - Ambient/Combat Music
CT-2810 ★ 2016 年 10 月 22 日 上午 11:02
[FIXED] Having Troubles with my own NOMBAT [FIXED]
!!! SEE THE ANSWERS BELOW FOR THE FIX !!!



So Gmod say that there's a problem with the path.
-------------------------------------------------------------------

Here is the error :

[NOMBAT DEBUG BEGIN] Set/Switch Song
Pack Path = 'nombat/acw/'
[NOMBAT] Error Song Time Tables Have Different Entrie Counts ( Time1 = 19 / Time2 = 20 )[NOMBAT DEBUG BEGIN] Set/Switch Song
Pack Path = 'nombat/acw/'
-------------------------------------------------------------------

Here is my .lua :

if SERVER then

resource.AddWorkshop("0123456789") --place you workshop addon number here ( I told you to copy it remember ;) )

end

if CLIENT then

function Nombat_Cl_Init( )

local pl = LocalPlayer() -- (DONT EDIT)

if IsValid(pl) then

if pl then

pl.NOMBAT_Level = 1 -- (DONT EDIT)
pl.NOMBAT_PostLevel = 1 -- (DONT EDIT)

local Ambient_Time = {47,43,262,150,27,178,178,75,53,59,56,62,16,33,46,36,62,79,68} --song time (in seconds)
pl.NOMBAT_Amb_Delay = CurTime() -- (DONT EDIT)

local Combat_Time = {257,153,45,164,83,42,132,63,75,38,69,65,177,66,66,264,225,235,270,230} --song time (in seconds)
pl.NOMBAT_Com_Delay = CurTime() -- (DONT EDIT)
pl.NOMBAT_Com_Cool = CurTime() -- (DONT EDIT)

local packName = "acw" --MAKE SURE THIS IS THE SAME AS THE FOLDER NAME HOLDING THE SOUNDS

packName = packName.."/" -- (DONT EDIT)

local subTable = { packName, Ambient_Time, Combat_Time } -- (DONT EDIT)

if !pl.NOMBAT_PackTable then -- (DONT EDIT)
pl.NOMBAT_PackTable = {subTable} -- (DONT EDIT)

else
table.insert( pl.NOMBAT_PackTable, subTable ) -- (DONT EDIT)
end

pl.NOMBAT_SVol = 0 -- (DONT EDIT)

end
end
end
hook.Add( "InitPostEntity", "Nombat_Cl_Init_acw", Nombat_Cl_Init ) -- change the "Nombat_Cl_Init_GAMENAME" to "Nombat_Cl_Init_" and your game name.

end
-------------------------------------------------------------------

Here is the locations :

Nombat Arma Cold War Assault\lua\autorun\nombat_ext_arma.lua

Nombat Arma Cold War Assault\sound\nombat\acw (folder with all .mp3) .

Thank you for help !
最后由 CT-2810 ★ 编辑于; 2016 年 10 月 27 日 下午 5:23
< >
正在显示第 1 - 2 条,共 2 条留言
LOL DUDE 2016 年 10 月 27 日 下午 5:12 
This error is because you have 19 ambient songs and 20 combat songs, and the script will not work unless the number of ambient songs is exactly the same as the number of combat songs. To solve this with my own packs, I created 1 second long dummy MP3s to fill up the remaining spots to make the numbers match.
CT-2810 ★ 2016 年 10 月 27 日 下午 5:22 
Fixed but thanks I don't remove this thread it's for users that are having the same problem, by your way, they'll solve it so I live it here ^^.
< >
正在显示第 1 - 2 条,共 2 条留言
每页显示数: 1530 50