Discord
Steam
/
Garry's Mod
/
Developers
/
Lua Errors nee..
Login/Join
Event Log
Lua Errors need help with basewars gamemode! cl_init.lua file
0 replies, posted
Search
In This Thread
[B]Here the error Pics from start to finish...[/B][IMG]gmadgaming.net/images/Screenshot (10).png[/IMG] [IMG]http://gmadgaming.net/images/Screenshot (6).png[/IMG] [IMG]http://gmadgaming.net/images/Screenshot (7).png[/IMG] [IMG]http://gmadgaming.net/images/Screenshot (8).png[/IMG] [IMG]http://gmadgaming.net/images/Screenshot (9).png[/IMG] [IMG]http://gmadgaming.net/images/Screenshot (10).png[/IMG] Thanks for the Help! [B]The Code that Has all the errors in it[/B] [lua]DeriveGamemode( "sandbox" ); drugeffect_doubletapmod = 0.675 GUIToggled = false; HelpToggled = false; HelpLabels = { } HelpCategories = { } --------------Tribe Tribes = {} AdminTellAlpha = -1; AdminTellStartTime = 0; AdminTellMsg = ""; MoneyAlpha = -1 MoneyY = 0 MoneyAmount = 0 MyMoney = "Reconnect" afkbigness = 255 afkdir = true local Extracrap = { } if( HelpVGUI ) then HelpVGUI:Remove(); end HelpVGUI = nil; StunStickFlashAlpha = -1; local viewpl = nil local viewpltime = 0 local viewstructure = nil local viewstructuretime = 0 surface.CreateFont( "AFKFont", { font = "ChatFont", size = 72, weight = 700, antialias = true, shadow = false }) // make it so that the small message font isnt too small to read for people with high res local tsize = 12 if ScrW()>1000 then tsize=16 end surface.CreateFont( "MessageFont", { font = "Default", size = tsize, weight = 500, antialias = true, shadow = false }) surface.CreateFont( "ComicNote", { font = "Comic Note", size = ScreenScale( 8 ), weight = 500, antialias = true, shadow = true }) surface.CreateFont( "Comic2", { font = "Comic Note", size = ScreenScale( 6 ), weight = 500, antialias = true, shadow = true }) function GM:Initialize() self.BaseClass:Initialize(); end include( "cl_deaths.lua" ); include( "shared.lua" ); include( "copypasta.lua" ); include( "cl_vgui.lua" ); include( "cl_helpvgui.lua" ); include( "entity.lua" ); include( "cl_scoreboard.lua" ); include( "cl_msg.lua" ); include( "cl_menu.lua" ); include("swep_fix.lua"); include( "LmaoLlama/simpleHud.lua" ); include("cl_voiceradius.lua"); include("cl_scan.lua"); surface.CreateFont( "AckBarWriting", { font = "akbar", size = 20, weight = 500, antialias = true, shadow = false }); surface.CreateFont( "HL2Symbols", { font = "HalfLife2", size = 72, weight = 500, antialias = true, shadow = true }); function GetTextHeight( font, str ) surface.SetFont( font ); local w, h = surface.GetTextSize( str ); return h; end local function DrawBox(startx, starty, sizex, sizey, color1,color2 ) draw.RoundedBox( 0, startx, starty, sizex, sizey, color2 ) draw.RoundedBox( 0, startx+1, starty+1, sizex-2, sizey-2, color1 ) end function DrawPlayerInfo( ply, scn ) if( not ply:Alive() ) then return; end local pos = ply:EyePos(); pos.z = pos.z + 14; pos = pos:ToScreen(); draw.DrawText( ply:Nick(), "TargetID", pos.x + 1, pos.y + 1, Color( 0, 0, 0, 255 ), 1 ); draw.DrawText( ply:Nick(), "TargetID", pos.x, pos.y, team.GetColor( ply:Team() ), 1 ); draw.DrawText( ply:GetNWString( "job" ), "TargetID", pos.x + 1, pos.y + 21, Color( 0, 0, 0, 255 ), 1 ); draw.DrawText( ply:GetNWString( "job" ), "TargetID", pos.x, pos.y + 20, Color( 255, 255, 255, 200 ), 1 ); local mudkips = 0 if (ply:GetNWInt("hitlist")>0 && (LocalPlayer():Team()==4 || LocalPlayer():Team()==5 || LocalPlayer():Team()==11)) then draw.DrawText( "Hit Target!", "TargetID", pos.x, pos.y+40, Color( 255, 255, 255, 200 ), 1 ); draw.DrawText( "Hit Target!", "TargetID", pos.x + 1, pos.y+41, Color( 100, 100, 100, 255 ), 1 ); mudkips = 20 end if scn then local weapn = ply:GetActiveWeapon() local wepclass = "Nothing" local wepammo = 0 if IsValid(weapn) then wepclass = weapn:GetClass() wepammo = weapn:Clip1() end -- draw.DrawText( "H: " .. tostring(ply:Health()) .. " A: " .. tostring(ply:Armor()) .. "\n" .. wepclass .. " " .. wepammo, "TargetID", pos.x + 1, pos.y + 41+mudkips, Color( 0, 0, 0, 255 ), 1 ); -- draw.DrawText( "H: " .. tostring(ply:Health()) .. " A: " .. tostring(ply:Armor()) .. "\n" .. wepclass .. " " .. wepammo, "TargetID", pos.x, pos.y+40+mudkips, Color(120,120,120,255), 1 ); end end local Scans = {} function ScannerSweep(msg) local ply = msg:ReadEntity() local pos = msg:ReadVector() local num = msg:ReadShort() Scans[num] = {} Scans[num].Time = CurTime()+10 Scans[num].Pos = pos Scans[num].Ply = ply end usermessage.Hook("RadarScan", ScannerSweep) function clearscan(index) //Msg(player.GetByID(index):GetName().."\n") Scans[index] = nil end function DrawServerInfo() local ply = LocalPlayer() if string.lower(game.GetMap()) == "rp_bangclaw" then cam.Start3D2D( Vector(-657, -962, 220), Angle(-180, -180, -90), 1 ) draw.DrawText("www.google.com", "ComicNote", 0, 0, Color(0, 0, 255, 200), TEXT_ALIGN_CENTER ) cam.End3D2D() cam.Start3D2D( Vector(-657, -962, 190), Angle(-180, -180, -90), 1 ) draw.DrawText("Donate by hitting [F3]", "MessageFont", 0, 0, Color(0, 255, 0, 200), TEXT_ALIGN_CENTER ) cam.End3D2D() cam.Start3D2D( Vector(-657, -962, 165), Angle(-180, -180, -90), 1 ) draw.DrawText("Welcome to Basewars!", "MessageFont", 0, 0, Color(255, 0, 0, 255), TEXT_ALIGN_CENTER ) cam.End3D2D() cam.Start3D2D( Vector(-657, -962, 140), Angle(-180, -180, -90), 1 ) draw.DrawText(ply:Nick(), "MessageFont", 0, 0, Color(255, 0, 0, 255), TEXT_ALIGN_CENTER ) cam.End3D2D() cam.Start3D2D( Vector(-657, -962, 120), Angle(-180, -180, -90), 1 ) draw.DrawText("Your current rank is: " ..ply:GetUserGroup(), "MessageFont", 0, 0, Color(0, 255, 0, 255), TEXT_ALIGN_CENTER ) cam.End3D2D() cam.Start3D2D( Vector(-657, -962, 95), Angle(-180, -180, -90), 1 ) draw.DrawText("Steam ID: " ..ply:SteamID(), "MessageFont", 0, 0, Color(120, 230, 150, 255), TEXT_ALIGN_CENTER ) cam.End3D2D() cam.Start3D2D( Vector(-1177.484253, -1196.532349, 185.697540), Angle(-180, 90, -90), 1 ) draw.DrawText("Welcome To Basewars " ..ply:Nick(), "MessageFont", 0, 0, Color(0, 0, 0, 255), TEXT_ALIGN_CENTER ) cam.End3D2D() end end hook.Add("PostDrawOpaqueRenderables", "ServerInfoDraw", DrawServerInfo) function DrawScans() for k, v in pairs(Scans) do if v!=nil then local ply = v.Ply if IsValid(ply) then local pos = v.Pos + Vector(0,0,100) pos = pos:ToScreen(); draw.DrawText( ply:Nick(), "TargetID", pos.x + 1, pos.y + 1, Color( 0, 0, 0, 255 ), 1 ); draw.DrawText( ply:Nick(), "TargetID", pos.x, pos.y, team.GetColor( ply:Team() ), 1 ); draw.DrawText( "SCAN", "TargetID", pos.x + 1, pos.y-16 + 1, Color( 0, 0, 0, 255 ), 1 ); draw.DrawText( "SCAN", "TargetID", pos.x, pos.y-16, Color(255,0,0,255 ), 1 ); end if v.Time<CurTime() then clearscan(k) end end end end function DrawBombInfo( ent ) if LocalPlayer():GetPos():Distance(ent:GetPos())<2048 && ent:GetNWBool("armed") then local pos = ent:GetPos()+ent:GetAngles():Up()*30; pos.z = pos.z + 14; pos = pos:ToScreen(); local time = math.ceil(ent:GetNWFloat("goofytiem")-CurTime()) if time<=2 then time = "YOU JUST LOST\nTHE GAME" end draw.DrawText( "BOMB\n" .. tos
Sorry, you need to
Log In
to post a reply to this thread.