• RadioMod help...
    24 replies, posted
Hello, i started using RadioMod addon, replaced the default songs with my own songs, but it's still playing the default songs... why? Also, why is this ---> [url]http://aijaa.com/mRwNAi[/url] happening? It should only show NadioMod, but it's also showing RadioMod..
Why don't you ask the author instead ? Also you really think that we'll be able to find the issue without looking onto code, just the picture ?
[QUOTE=Netheous;42650765]Why don't you ask the author instead ? Also you really think that we'll be able to find the issue without looking onto code, just the picture ?[/QUOTE] cl_init.lua: [CODE]include('shared.lua') function ENT:Initialize() end function ENT:Draw() self.Entity:DrawModel() end function DrawInfoOldRadio() local tr = LocalPlayer():GetEyeTrace() if IsValid(tr.Entity) and tr.Entity:GetPos():Distance(LocalPlayer():GetPos()) < 400 then if tr.Entity:GetClass() == "radio" then local ent = tr.Entity local pos = ent:GetPos() pos.z = pos.z + 8 pos = pos:ToScreen() local owner = "" if IsValid(ent:GetNWEntity("owning_ent")) then owner = ent:GetNWEntity("owning_ent"):Nick() end local text2 = owner .. "" local text = owner .. "" draw.DrawText(text, "TargetID", pos.x + 1, pos.y + 17, Color(255, 150, 0, 200), 1) draw.DrawText(text2, "TargetID", pos.x, pos.y, Color(255, 150, 0, 200), 1) end end end hook.Add( "HUDPaint", "DrawInfoOldRadio", DrawInfoOldRadio ) [/CODE] init.lua: [CODE] AddCSLuaFile("cl_init.lua") AddCSLuaFile("shared.lua") include('shared.lua') --Musique de la radio ENT.RadioSong1 = NULL ENT.RadioSong2 = NULL ENT.RadioSong3 = NULL ENT.RadioSong4 = NULL ENT.SongNr = 0 ENT.NxtDelay = CurTime() function ENT:SpawnFunction(ply, tr) if (!tr.Hit) then return end local SpawnPos = tr.HitPos + tr.HitNormal * 16 local ent = ents.Create("radio") ent:SetPos(SpawnPos) ent:Spawn() ent:Activate() return ent end function ENT:Initialize( ) self:SetModel( "models/clutter/radio.mdl" ) self:PhysicsInit( SOLID_VPHYSICS ) self:SetMoveType( MOVETYPE_VPHYSICS ) self:SetSolid( SOLID_VPHYSICS ) local phys = self:GetPhysicsObject() if(phys:IsValid()) then phys:Wake() end self.Engine = NULL self.RadioSong1 = CreateSound(self.Entity,"[xr]/1.mp3") self.RadioSong2 = CreateSound(self.Entity,"[xr]/2.mp3") self.RadioSong3 = CreateSound(self.Entity,"[xr]/3.mp3") self.RadioSong4 = CreateSound(self.Entity,"[xr]/4.mp3") end function ENT:Use(activator, caller) if self.NxtDelay < CurTime() then self.NxtDelay = CurTime()+0.5 self.SongNr = self.SongNr + 1 self.Entity:EmitSound("[XR]/radio_select.wav", 100, 100) if self.SongNr >26 then self.SongNr = 0 self.Entity:EmitSound("[XR]/radio_off.wav", 100, 100) end end end function ENT:Think() if self.Entity:WaterLevel() > 0 then local effectdata = EffectData() effectdata:SetOrigin( self.Entity:GetPos()) effectdata:SetStart(Vector(0,0,2)) util.Effect( "PropellerBubbles", effectdata ) end if self.SongNr == 1 then self.RadioSong1:Play() end if self.SongNr == 2 then self.RadioSong1:Stop() self.RadioSong2:Play() end if self.SongNr == 3 then self.RadioSong1:Stop() self.RadioSong2:Stop() self.RadioSong3:Play() end if self.SongNr == 4 then self.RadioSong1:Stop() self.RadioSong2:Stop() self.RadioSong3:Stop() self.RadioSong4:Play() end [/CODE]
Stop throwing code at us and expecting us to fix it for you.
[QUOTE]Also you really think that we'll be able to find the issue without looking onto code, just the picture ?[/QUOTE] Oh my fucking god....
[QUOTE=Niskuo;42651378]Oh my fucking god....[/QUOTE] The menu isn't even in that code... That's just the entity...
[QUOTE=Nookyava;42651470]The menu isn't even in that code... That's just the entity...[/QUOTE] What menu? They are all lua files in that addon...
[QUOTE=Niskuo;42651483]What menu? They are all lua files in that addon...[/QUOTE] This [QUOTE]Hello, i started using RadioMod addon, replaced the default songs with my own songs, but it's still playing the default songs... why?[/QUOTE] Also, why is this ---> [url]http://aijaa.com/mRwNAi[/url] happening? It should only show NadioMod, but it's also showing RadioMod.. You had an issue with the menu (aka with showing RadioMod as well). Post that too.
[QUOTE=Nookyava;42651508]This Also, why is this ---> [url]http://aijaa.com/mRwNAi[/url] happening? It should only show NadioMod, but it's also showing RadioMod.. You had an issue with the menu (aka with showing RadioMod as well). Post that too.[/QUOTE] RadioMod was outdated, and not working like it should anymore. Now my only problem is the default songs.. >_>
[QUOTE=Niskuo;42651518]RadioMod was outdated, and not working like it should anymore. Now my only problem is the default songs.. >_>[/QUOTE] [code]--Musique de la radio ENT.RadioSong1 = NULL ENT.RadioSong2 = NULL ENT.RadioSong3 = NULL ENT.RadioSong4 = NULL[/code] I assume you changed that, yes? Well if that is still not changing it, change these: [code]self.RadioSong1 = CreateSound(self.Entity,"[xr]/1.mp3") self.RadioSong2 = CreateSound(self.Entity,"[xr]/2.mp3") self.RadioSong3 = CreateSound(self.Entity,"[xr]/3.mp3") self.RadioSong4 = CreateSound(self.Entity,"[xr]/4.mp3") [/code] As you can see there those are the radio songs, they're calling upon the files that chances are, are already there. So rename those to your new songs.
[QUOTE=Nookyava;42651530][code]--Musique de la radio ENT.RadioSong1 = NULL ENT.RadioSong2 = NULL ENT.RadioSong3 = NULL ENT.RadioSong4 = NULL[/code] I assume you changed that, yes? Well if that is still not changing it, change these: [code]self.RadioSong1 = CreateSound(self.Entity,"[xr]/1.mp3") self.RadioSong2 = CreateSound(self.Entity,"[xr]/2.mp3") self.RadioSong3 = CreateSound(self.Entity,"[xr]/3.mp3") self.RadioSong4 = CreateSound(self.Entity,"[xr]/4.mp3") [/code] As you can see there those are the radio songs, they're calling upon the files that chances are, are already there. So rename those to your new songs.[/QUOTE] Already did.
[QUOTE=Niskuo;42651557]Already did.[/QUOTE] Even the second part? Where it's literally on initialization setting the song files to 1, 2, 3 and 4?
[QUOTE=Nookyava;42651566]Even the second part? Where it's literally on initialization setting the song files to 1, 2, 3 and 4?[/QUOTE] Yes. I have 1.mp3, 2.mp3, 3.mp3 and 4.mp3 in [xr] folder.
[QUOTE=Niskuo;42651574]Yes. I have 1.mp3, 2.mp3, 3.mp3 and 4.mp3 in [xr] folder.[/QUOTE] No no no, have your song files in that folder, but rename the numbers in the code, so for example: [CODE]self.RadioSong1 = CreateSound(self.Entity,"[xr]/1.mp3")[/CODE] to [CODE]self.RadioSong1 = CreateSound(self.Entity,"[xr]/someshittymusicprobablyrobzombieforendround.mp3")[/CODE]
[QUOTE=Nookyava;42651587]No no no, have your song files in that folder, but rename the numbers in the code, so for example: [CODE]self.RadioSong1 = CreateSound(self.Entity,"[xr]/1.mp3")[/CODE] to [CODE]self.RadioSong1 = CreateSound(self.Entity,"[xr]/someshittymusicprobablyrobzombieforendround.mp3")[/CODE][/QUOTE] I did that, but now it's giving me error in console: 'end' expected (to close 'function' at line 66) near '<eof>'
[QUOTE=Niskuo;42651688]I did that, but now it's giving me error in console: 'end' expected (to close 'function' at line 66) near '<eof>'[/QUOTE] Show me the code now [b]Edit:[/b] That also means you edited something else, not just the names.
[QUOTE=Nookyava;42651699]Show me the code now [b]Edit:[/b] That also means you edited something else, not just the names.[/QUOTE] Repaired it somehow lol
[QUOTE=Niskuo;42651742]Repaired it somehow lol[/QUOTE] O.k....... So it works now?...
[QUOTE=Nookyava;42651747]O.k....... So it works now?...[/QUOTE] Well, no errors... But still those shitty default songs...
[QUOTE=Niskuo;42651763]Well, no errors... But still those shitty default songs...[/QUOTE] Impossible, unless there is code you aren't showing us.
[QUOTE=Nookyava;42651794]Impossible, unless there is code you aren't showing us.[/QUOTE] well, there is shared.lua: [CODE]ENT.Base = "base_anim" ENT.Type = "anim" ENT.PrintName = "Vieille radio" ENT.Author = "Retravaillé par MrTakaize" ENT.Category = "Vieille radio" ENT.Spawnable = true ENT.AdminSpawnable = true -- Do not change these settings. Or I will murder you >:([/CODE]
[QUOTE=Niskuo;42651818]well, there is shared.lua: [CODE]ENT.Base = "base_anim" ENT.Type = "anim" ENT.PrintName = "Vieille radio" ENT.Author = "Retravaillé par MrTakaize" ENT.Category = "Vieille radio" ENT.Spawnable = true ENT.AdminSpawnable = true -- Do not change these settings. Or I will murder you >:([/CODE][/QUOTE] You're telling me there is nothing else, nothing that isn't in the entity?
[QUOTE=Nookyava;42651847]You're telling me there is nothing else, nothing that isn't in the entity?[/QUOTE] \garrysmod\addons\FONW\lua\entities\radio <--- cl_init.lua, init.lua and shared.lua Now it's not playing the music... Should i upload it to the workshop and then use workshop fastdl, then it would work... maybe
[QUOTE=Niskuo;42651860]\garrysmod\addons\FONW\lua\entities\radio <--- cl_init.lua, init.lua and shared.lua Now it's not playing the music... Should i upload it to the workshop and then use workshop fastdl, then it would work... maybe[/QUOTE] Did you add your music files to fastdl, and then tell the server to download them to clients?
[QUOTE=stapler2025;42652282]Did you add your music files to fastdl, and then tell the server to download them to clients?[/QUOTE] No. Im trying to get the addon with custom music files to workshop. Then i can do that
Sorry, you need to Log In to post a reply to this thread.