• (TTT) addons not working?
    12 replies, posted
So I'm currently having a problem with some addons that I added in for my TTT server. I tired adding in some like slow motion at the end of each round, map voting, etc, but none of those are working. If anyone can help/has any suggestions please respond on here, or message me on Steam.
How did you add them to your server?
[QUOTE=code_gs;43352382]How did you add them to your server?[/QUOTE] I added them through my addons folder. They did not come with a "how to install file" or anything with that sort.
Can you take a picture of your addons directory?
[IMG]http://icap.me/i/7epDXqxher.png[/IMG] Ones underlined in red or the ones not working End of Round Music Map Voting Jihad bomb and TTT ULX addon.
Show server console log, from start to fully loaded, and post a picture showing what's inside those underlined folders.
In my console.log, it does not show any file with any of the names I provided. This is all it shows. [CODE]Fetching Workshop Addons.. No -authkey Adding Filesystem Addon 'c:\tcafiles\users\aundrej\15805\garrysmod\addons\eorm' Adding Filesystem Addon 'c:\tcafiles\users\aundrej\15805\garrysmod\addons\fpp' Adding Filesystem Addon 'c:\tcafiles\users\aundrej\15805\garrysmod\addons\mapvote' Adding Filesystem Addon 'c:\tcafiles\users\aundrej\15805\garrysmod\addons\parakeet's pill pack' Adding Filesystem Addon 'c:\tcafiles\users\aundrej\15805\garrysmod\addons\playx' Adding Filesystem Addon 'c:\tcafiles\users\aundrej\15805\garrysmod\addons\pointshop-extras-master' Adding Filesystem Addon 'c:\tcafiles\users\aundrej\15805\garrysmod\addons\pointshop-master' Adding Filesystem Addon 'c:\tcafiles\users\aundrej\15805\garrysmod\addons\rdm manager' Adding Filesystem Addon 'c:\tcafiles\users\aundrej\15805\garrysmod\addons\suicide_bomb' Adding Filesystem Addon 'c:\tcafiles\users\aundrej\15805\garrysmod\addons\tttulx-master' Adding Filesystem Addon 'c:\tcafiles\users\aundrej\15805\garrysmod\addons\ulib' Adding Filesystem Addon 'c:\tcafiles\users\aundrej\15805\garrysmod\addons\ulx' Adding Filesystem Addon 'c:\tcafiles\users\aundrej\15805\garrysmod\addons\urs-master' Adding Path: [garrysmod\cstrike] FIND [garrysmod\cstrike\*.vpk] ADDING [garrysmod\cstrike\cstrike_pak_000.vpk] Adding Path: [garrysmod\tf] FIND [garrysmod\tf\*.vpk] Unknown command "ttt_postround_dm" Unknown command "ttt_idle_limit" Changing gamemode to Trouble in Terrorist Town (terrortown) Adding Filesystem Addon 'c:\tcafiles\users\aundrej\15805\garrysmod\addons\eorm' Adding Filesystem Addon 'c:\tcafiles\users\aundrej\15805\garrysmod\addons\fpp' Adding Filesystem Addon 'c:\tcafiles\users\aundrej\15805\garrysmod\addons\mapvote' Adding Filesystem Addon 'c:\tcafiles\users\aundrej\15805\garrysmod\addons\parakeet's pill pack' Adding Filesystem Addon 'c:\tcafiles\users\aundrej\15805\garrysmod\addons\playx' Adding Filesystem Addon 'c:\tcafiles\users\aundrej\15805\garrysmod\addons\pointshop-extras-master' Adding Filesystem Addon 'c:\tcafiles\users\aundrej\15805\garrysmod\addons\pointshop-master' Adding Filesystem Addon 'c:\tcafiles\users\aundrej\15805\garrysmod\addons\rdm manager' Adding Filesystem Addon 'c:\tcafiles\users\aundrej\15805\garrysmod\addons\suicide_bomb' Adding Filesystem Addon 'c:\tcafiles\users\aundrej\15805\garrysmod\addons\tttulx-master' Adding Filesystem Addon 'c:\tcafiles\users\aundrej\15805\garrysmod\addons\ulib' Adding Filesystem Addon 'c:\tcafiles\users\aundrej\15805\garrysmod\addons\ulx' Adding Filesystem Addon 'c:\tcafiles\users\aundrej\15805\garrysmod\addons\urs-master' Adding Path: [garrysmod\cstrike] FIND [garrysmod\cstrike\*.vpk] ADDING [garrysmod\cstrike\cstrike_pak_000.vpk] Adding Path: [garrysmod\tf] FIND [garrysmod\tf\*.vpk] WARNING: Port 27005 was unavailable - bound to port 27007 instead Network: IP 199.116.118.35, mode MP, dedicated Yes, ports 27045 SV / 27007 CL PREP OK Lua JIT is DISABLED! /====================================\ || PlayX || ||----------------------------------|| || Version 2.7.9 || || Updated on 12-07-2013 02:48 PM || || Last Patch by Nexus [BR] || \====================================/ HTTP failed - ISteamHTTP isn't available! /////////////////////////////// // Ulysses Library // /////////////////////////////// // Loading... // // shared/defines.lua // // shared/misc.lua // // shared/util.lua // // shared/hook.lua // // shared/table.lua // // shared/player.lua // // server/player.lua // // shared/messages.lua // // shared/commands.lua // // server/concommand.lua // // server/util.lua // // shared/sh_ucl.lua // // server/ucl.lua // // server/phys.lua // // server/player_ext.lua // // server/entity_ext.lua // // Load Complete! // /////////////////////////////// [ULIB] Loading SHARED module: playx_ulib_group_manager.lua [ULIB] Loading SHARED module: ulx_init.lua /////////////////////////////// // ULX Admin Mod // /////////////////////////////// // Loading... // // sh_defines.lua // // lib.lua // // base.lua // // sh_base.lua // // log.lua // // MODULE: slots.lua // // MODULE: urs_server.lua // // MODULE: uteam.lua // // MODULE: votemap.lua // // MODULE: xgui_server.lua // /////////////////////////////// // ULX GUI -- by Stickly Man // /////////////////////////////// // Adding Main Modules.. // // bans.lua // // commands.lua // // groups.lua // // maps.lua // // settings.lua // // Adding Setting Modules.. // // cl_urs_gui.lua // // client.lua // // server.lua // // Adding Gamemode Modules.. // // sandbox.lua // // Loading Server Modules.. // // sv_bans.lua // // sv_groups.lua // // sv_maps.lua // // sv_sandbox.lua // // sv_settings.lua // // sv_urs_gui.lua // // XGUI modules added! // /////////////////////////////// // MODULE: chat.lua // // MODULE: fun.lua // // MODULE: menus.lua // // MODULE: rcon.lua // // MODULE: teleport.lua // // MODULE: urs_cmds.lua // // MODULE: user.lua // // MODULE: userhelp.lua // // MODULE: util.lua // // MODULE: vote.lua // // end.lua // // Load Complete! // /////////////////////////////// Included TTT language file: chef.lua Included TTT language file: english.lua [AddCSLuaFile] Couldn't find 'weapons/gmod_tool/shared.lua' (<nowhere>) HTTP failed - ISteamHTTP isn't available! NOTE: This server is being placed on the Parakeet's Pill Pack Server List. This list logs the date, name, IP, type, and whether the server is passworded. If you do not want your server to be on this list, configure pk_pill_report to 0 on server start. Trouble In Terrorist Town gamemode initializing... This is TTT version 2013-07-28 Checking TTT file consistency. Using map cycle file 'mapcycle.txt'. ('cfg/mapcycle.txt' was not found.) CModelLoader::Map_IsValid: No such map 'maps/cp_gravelpit.bsp' Invalid map 'cp_gravelpit' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_dustbowl.bsp' Invalid map 'cp_dustbowl' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_granary.bsp' Invalid map 'cp_granary' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_well.bsp' Invalid map 'cp_well' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/ctf_2fort.bsp' Invalid map 'ctf_2fort' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/tc_hydro.bsp' Invalid map 'tc_hydro' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/ctf_well.bsp' Invalid map 'ctf_well' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_badlands.bsp' Invalid map 'cp_badlands' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/pl_goldrush.bsp' Invalid map 'pl_goldrush' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_fastlane.bsp' Invalid map 'cp_fastlane' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/ctf_turbine.bsp' Invalid map 'ctf_turbine' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/pl_badwater.bsp' Invalid map 'pl_badwater' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_steel.bsp' Invalid map 'cp_steel' included in map cycle file. Ignored. CModelLoader::Map
[code]CModelLoader::Map_IsValid: No such map 'maps/cp_gravelpit.bsp' Invalid map 'cp_gravelpit' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_dustbowl.bsp' Invalid map 'cp_dustbowl' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_granary.bsp' Invalid map 'cp_granary' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_well.bsp' Invalid map 'cp_well' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/ctf_2fort.bsp' Invalid map 'ctf_2fort' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/tc_hydro.bsp' Invalid map 'tc_hydro' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/ctf_well.bsp' Invalid map 'ctf_well' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_badlands.bsp' Invalid map 'cp_badlands' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/pl_goldrush.bsp' Invalid map 'pl_goldrush' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_fastlane.bsp' Invalid map 'cp_fastlane' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/ctf_turbine.bsp' Invalid map 'ctf_turbine' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/pl_badwater.bsp' Invalid map 'pl_badwater' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_steel.bsp' Invalid map 'cp_steel' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_egypt_final.bsp' Invalid map 'cp_egypt_final' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_junction_final.bsp' Invalid map 'cp_junction_final' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/plr_pipeline.bsp' Invalid map 'plr_pipeline' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/pl_hoodoo_final.bsp' Invalid map 'pl_hoodoo_final' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/koth_sawmill.bsp' Invalid map 'koth_sawmill' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/koth_nucleus.bsp' Invalid map 'koth_nucleus' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/koth_viaduct.bsp' Invalid map 'koth_viaduct' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/ctf_sawmill.bsp' Invalid map 'ctf_sawmill' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_yukon_final.bsp' Invalid map 'cp_yukon_final' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/koth_harvest_final.bsp' Invalid map 'koth_harvest_final' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/ctf_doublecross.bsp' Invalid map 'ctf_doublecross' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_gorge.bsp' Invalid map 'cp_gorge' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_freight_final1.bsp' Invalid map 'cp_freight_final1' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/pl_upward.bsp' Invalid map 'pl_upward' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/plr_hightower.bsp' Invalid map 'plr_hightower' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/pl_thundermountain.bsp' Invalid map 'pl_thundermountain' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_coldfront.bsp' Invalid map 'cp_coldfront' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_mountainlab.bsp' Invalid map 'cp_mountainlab' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_degrootkeep.bsp' Invalid map 'cp_degrootkeep' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_5gorge.bsp' Invalid map 'cp_5gorge' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/pl_frontier_final.bsp' Invalid map 'pl_frontier_final' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/plr_nightfall_final.bsp' Invalid map 'plr_nightfall_final' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/koth_lakeside_final.bsp' Invalid map 'koth_lakeside_final' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/koth_badlands.bsp' Invalid map 'koth_badlands' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/pl_barnblitz.bsp' Invalid map 'pl_barnblitz' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_gullywash_final1.bsp' Invalid map 'cp_gullywash_final1' included in map cycle file. Ignored.[/code] You haven't configured your map vote correctly.
[QUOTE=code_gs;43353388][code]CModelLoader::Map_IsValid: No such map 'maps/cp_gravelpit.bsp' Invalid map 'cp_gravelpit' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_dustbowl.bsp' Invalid map 'cp_dustbowl' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_granary.bsp' Invalid map 'cp_granary' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_well.bsp' Invalid map 'cp_well' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/ctf_2fort.bsp' Invalid map 'ctf_2fort' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/tc_hydro.bsp' Invalid map 'tc_hydro' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/ctf_well.bsp' Invalid map 'ctf_well' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_badlands.bsp' Invalid map 'cp_badlands' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/pl_goldrush.bsp' Invalid map 'pl_goldrush' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_fastlane.bsp' Invalid map 'cp_fastlane' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/ctf_turbine.bsp' Invalid map 'ctf_turbine' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/pl_badwater.bsp' Invalid map 'pl_badwater' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_steel.bsp' Invalid map 'cp_steel' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_egypt_final.bsp' Invalid map 'cp_egypt_final' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_junction_final.bsp' Invalid map 'cp_junction_final' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/plr_pipeline.bsp' Invalid map 'plr_pipeline' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/pl_hoodoo_final.bsp' Invalid map 'pl_hoodoo_final' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/koth_sawmill.bsp' Invalid map 'koth_sawmill' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/koth_nucleus.bsp' Invalid map 'koth_nucleus' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/koth_viaduct.bsp' Invalid map 'koth_viaduct' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/ctf_sawmill.bsp' Invalid map 'ctf_sawmill' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_yukon_final.bsp' Invalid map 'cp_yukon_final' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/koth_harvest_final.bsp' Invalid map 'koth_harvest_final' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/ctf_doublecross.bsp' Invalid map 'ctf_doublecross' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_gorge.bsp' Invalid map 'cp_gorge' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_freight_final1.bsp' Invalid map 'cp_freight_final1' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/pl_upward.bsp' Invalid map 'pl_upward' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/plr_hightower.bsp' Invalid map 'plr_hightower' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/pl_thundermountain.bsp' Invalid map 'pl_thundermountain' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_coldfront.bsp' Invalid map 'cp_coldfront' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_mountainlab.bsp' Invalid map 'cp_mountainlab' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_degrootkeep.bsp' Invalid map 'cp_degrootkeep' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_5gorge.bsp' Invalid map 'cp_5gorge' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/pl_frontier_final.bsp' Invalid map 'pl_frontier_final' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/plr_nightfall_final.bsp' Invalid map 'plr_nightfall_final' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/koth_lakeside_final.bsp' Invalid map 'koth_lakeside_final' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/koth_badlands.bsp' Invalid map 'koth_badlands' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/pl_barnblitz.bsp' Invalid map 'pl_barnblitz' included in map cycle file. Ignored. CModelLoader::Map_IsValid: No such map 'maps/cp_gullywash_final1.bsp' Invalid map 'cp_gullywash_final1' included in map cycle file. Ignored.[/code] You haven't configured your map vote correctly.[/QUOTE] I removed those maps due it auto changing maps and it changed to ones that are broken. (TF2 maps) Is that what's breaking the server?
Just configure the addon to select the correct maps.
[QUOTE=code_gs;43353582]Just configure the addon to select the correct maps.[/QUOTE] What about the other addons?
You never described what the addons did, posted any code or screenshots of the addons' directories, etc.
Alrighty, i marked out The End of Round Music, I thought I configured it, but I didn't. This is the Jihad bomb...unknown on what to do with it. there are two other files but this seems like the main one, located in /199.116.118.35_27045/garrysmod/addons/suicide_bomb/entities/weapons/weapon_ttt_suicide_bomb [CODE]-- Suicide Bomb By Manmax75 :D Made For Taconation -- Visit www.taconation.net if SERVER then AddCSLuaFile("shared.lua") resource.AddFile("materials/VGUI/ttt/icon_suicidebomb.vmt") -- Suicide Bomb end if CLIENT then SWEP.PrintName = "Suicide Bomb" SWEP.Instructions = "Secondary Fire to arm, wait 10 seconds\n then Primary Fire to detonate." SWEP.Slot = 6 SWEP.ViewModelFOV = 10 SWEP.EquipMenuData = { type="Weapon", model="models/weapons/w_c4_planted.mdl", name="Suicide Bomb", desc="Powerful Bomb\nUse to blow yourself up.\n\nSecondary Fire to arm, wait 10 seconds\n then Primary Fire to detonate.\nBe Warned You Only Have 20 Seconds..." }; SWEP.Icon = "VGUI/ttt/icon_suicidebomb" end SWEP.Base = "weapon_tttbase" -- Must be from tttbase unless you want lua death... SWEP.ViewModel = "models/weapons/v_c4.mdl" SWEP.WorldModel = "models/weapons/w_c4.mdl" SWEP.Weight = 50 SWEP.HoldType = "slam" SWEP.Kind = WEAPON_EQUIP SWEP.CanBuy = {ROLE_TRAITOR} -- Traitor only weap.. dah SWEP.WeaponID = SUICIDE_BOMB SWEP.Primary.ClipSize = -1 SWEP.Primary.DefaultClip = -1 SWEP.Primary.Automatic = false SWEP.Primary.Ammo = "none" SWEP.Primary.Delay = 5.0 SWEP.AllowDrop = true SWEP.Secondary.ClipSize = -1 SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.Automatic = false SWEP.Secondary.Ammo = "none" SWEP.Secondary.Delay = 1.0 SWEP.NoSights = true SWEP.arming = false SWEP.armedandready = false SWEP.arming_time = 11 SWEP.loopingSound = nil SWEP.ply = nil SWEP.curhealth = nil SWEP.takehealth = nil SWEP.takepercentage = nil function SWEP:Reload() return false end function SWEP:ShouldDropOnDie() self:Remove() end function SWEP:OnRemove() if CLIENT then BarRemove() end end function SWEP:Equip(newowner) if not newowner:IsActiveTraitor() then self:Remove() end end if CLIENT then local hudtxt = { {text="Primary Fire To Detonate When Charged.", font="TabLarge", xalign=TEXT_ALIGN_RIGHT}, {text="Secondary Fire To Begin Charging.", font="TabLarge", xalign=TEXT_ALIGN_RIGHT} }; function SWEP:DrawHUD() local x = ScrW() - 80 hudtxt[1].pos = {x, ScrH() - 80} draw.TextShadow(hudtxt[1], 2) hudtxt[2].pos = {x, ScrH() - 60} draw.TextShadow(hudtxt[2], 2) end function BarDraw(data) local activate = data:ReadBool() local entvalue = data:ReadShort() local charply = data:ReadEntity() local chardone = false local locply = LocalPlayer() local timeleft = 15 end_time = CurTime() + 10 autodes_end_time = 0 if charply == locply then if activate == true then bar = vgui.Create("TTTProgressBar") -- Progress Bar bar:SetSize(370, 35) bar:SetPos(0, 0) bar:CenterHorizontal() bar:SetMin(1) bar:SetMax(100) bar:SetValue(1) bar:LabelAsPercentage() state = vgui.Create("DLabel", bar) -- Status state:SetSize(0, 35) state:SetPos(10, 6) state:SetFont("Trebuchet22") state:SetText("READY TO CHARGE") state:SetTextColor(COLOR_WHITE) state:SizeToContents() function bar:Think() if locply:Alive() and locply:IsValid() then if bar:GetValue() <= 100 and chardone == false then bar:SetValue(100 - ((end_time - CurTime()) / 0.1)) bar:SetColor(COLOR_RED) state:SetText("CHARGING") state:SizeToContents() else if chardone == false then chardone = true bar:SetColor(COLOR_BLUE) state:SetText("READY FOR DETONATION...Auto Detonate") state:SizeToContents() autodes_end_time = CurTime() + 20 RunConsoleCommand("ttt_suicidebomb-done", entvalue); bar:SetValue(1) else timeleft = timeleft - 1 state:SetText("READY FOR DETONATION...Auto Detonate") bar:SetValue(10 + ((autodes_end_time - CurTime()) / 0.2275)) end end else if bar:IsValid() then bar:Remove() end end end else if bar:IsValid() then bar:Remove() end end end end function BarRemove() if bar:IsValid() then bar:Remove() end end usermessage.Hook("SuicideBombBar", BarDraw); end if SERVER then function TTTSuicideDone(ply, cmd, args) local idx = tonumber(args[1]) local self = ents.GetByIndex(idx) if self:IsValid() then if self.arming == true and self.AllowDrop == false then self.loopingSound:Stop() self.armedandready = true self.arming = false self.Owner:PrintMessage(4,"You Only Have 20 Seconds Until You Auto Detonate...") timer.Create("autodetonate", 20, 1, AutoDetonate, self) end end end concommand.Add("ttt_suicidebomb-done", TTTSuicideDone) end function AutoDetonate(self) self.Owner.SetColor(self.Owner ,255, 255, 255, 255) -- Colour again ownr = self.Owner umsg.Start("SuicideBombBar", ownr); umsg.Bool(false); umsg.End(); self.DetonateBomb(self) end function SWEP:Deploy() self.ply = self.Owner self.curhealth = self.ply:Health() -- These lines are all the percentage math crap self.takehealth = self.curhealth / 100 * 80 self.takepercentage = self.takehealth self.curhealth = math.Round(self.curhealth - self.takehealth) if self.curhealth > 1 then self.ply.SetHealth(self.ply ,self.curhealth) end self.ply.SetColor(self.ply, 255, 0, 0, 255) -- Setting player red WOOOT end function SWEP:PreDrop() if self.AllowDrop == false then if self.loopingSound:IsPlaying() then self.loopingSound:Stop() -- Stop the sound if you die mid-charge ownr = self.Owner end umsg.Start("SuicideBombBar", ownr); umsg.Bool(false); umsg.End(); self.arming = false self.armedandready = false self.arming_time = 11 self.Owner.SetColor(self.Owner ,255, 255, 255, 255) -- Set you back to normal colour so you don't spawn like a cherry self.AllowDrop = true else self.arming = false self.armedandready = false -- Other condition cleaning up self.arming_time = 11 self.curhealth = self.Owner:Health() takepercent = self.takepercentage self.curhealth = math.Clamp(math.Round(self.curhealth + takepercent), 1, 100) self.Owner.SetHealth(self.Owner, self.curhealth) -- Fixing your health so it adds %80 back self.Owner.SetHealth(self.Owner, self.curhealth) self.Owner.SetColor(self.Owner ,255, 255, 255, 255) end return self.BaseClass.PreDrop(self) end function SWEP:DetonateBomb() local ply = self.Owner if not ValidEntity(ply) then return end local vsrc = ply:GetShootPos() local vang = ply:GetAimVector() -- Shoot physics shit local vvel = ply:GetVelocity() local vthrow = vvel + vang local bomb = ents.Create("ttt_suicideBomb") if ValidEntity(bomb) then bomb:SetPos(vsrc + vang * 10) bomb:SetOwner(ply) bomb:SetThrower(ply) bomb:Spawn() -- Spawns the bomb, obvisouly, lol bomb:PointAtEntity(ply) local ang = bomb:GetAngles() ang:RotateAroundAxis(ang:Up(), 180) bomb:SetAngles(ang) bomb:PhysWake() local phys = bomb:GetPhysicsObject() if ValidEntity(phys) then phys:SetVelocity(vthrow) end self:Remove() end end function SWEP:PrimaryAttack() if self.armedandready == true then self.Owner.SetColor(self.Owner ,255, 255, 255, 255) -- Colour again ownr = self.Owner umsg.Start("SuicideBombBar", ownr); umsg.Bool(false); umsg.End(); self.DetonateBomb(self) else if self.arming == false then self.Owner:PrintMessage(4,"You Need To Be Charged First.") end end end function
Sorry, you need to Log In to post a reply to this thread.