Advertisement
Guest User

Lua

a guest
Sep 27th, 2014
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.45 KB | None | 0 0
  1. function JEHud()
  2.  
  3.     if(LocalPlayer()) then
  4.  
  5.     if(LocalPlayer():GetNWInt(LocalPlayer():Name() .. "_rtint") == 1 && oneShot) then
  6.         rtTime = CurTime()
  7.         oneShot = false
  8.     end
  9.    
  10.    
  11.    
  12.     draw.RoundedBox( 8, 0, 0, ScrW(), 30, Color(0,0,0,155) )
  13.     draw.DrawText("Food: " .. LocalPlayer():GetNWInt(LocalPlayer():Nick() .. "_food") .. " (+" .. LocalPlayer():GetNWInt(LocalPlayer():Nick() .. "_farms") * 5 + 5 .. ")", "ScoreboardText", 60, 5, Color(100,255,100,255),1)
  14.     draw.DrawText("Iron: " .. LocalPlayer():GetNWInt(LocalPlayer():Nick() .. "_iron") .. " (+" .. LocalPlayer():GetNWInt(LocalPlayer():Nick() .. "_mines") * 2 + 2 .. ")", "ScoreboardText", 200, 5, Color(175,175,175,255),1)
  15.     draw.DrawText("Cities: " .. LocalPlayer():GetNWInt(LocalPlayer():Nick() .. "_cities") , "ScoreboardText", 480, 5, Color(100,0,255,255),1)
  16.     draw.DrawText("Soldiers: " .. LocalPlayer():GetNWInt(LocalPlayer():Nick() .. "_soldiers") , "ScoreboardText", 570, 5, Color(255,0,0,255),1)
  17.     draw.DrawText("Ranged Support: " .. LocalPlayer():GetNWInt(LocalPlayer():Nick() .. "_ranged") .. " /5" , "ScoreboardText", 690, 5, Color(255,100,0,255),1)
  18.     draw.DrawText( "Player ID | Name" , "ScoreboardText", ScrW() - 200, 40, Color(255,255,255,255),0)
  19.    
  20.     if(table.getn(ents.FindByClass("pylon")) != 0) then
  21.         draw.DrawText("Pylons: " .. LocalPlayer():GetNWInt(LocalPlayer():Nick() .. "_pylons") .. " /" .. math.ceil((table.getn(ents.FindByClass("pylon")) * .6)) , "ScoreboardText", 820, 5, Color(100,255,0,255),1)
  22.         draw.DrawText("Gold: " .. LocalPlayer():GetNWInt(LocalPlayer():Nick() .. "_gold") .. " (+" .. LocalPlayer():GetNWInt(LocalPlayer():Nick() .. "_cities") * 1 .. ")", "ScoreboardText", 360, 5, Color(255,255,0,255),1)
  23.     else
  24.         draw.DrawText("Gold: " .. LocalPlayer():GetNWInt(LocalPlayer():Nick() .. "_gold") .. " /1000 " .. "(+" .. LocalPlayer():GetNWInt(LocalPlayer():Nick() .. "_cities") * 1 .. ")", "ScoreboardText", 360, 5, Color(255,255,0,255),1)
  25.     end
  26.    
  27.     draw.RoundedBox( 8, ScrW() / 2 - 20, 30, 200, 12, Color(0,0,0,155) )
  28.     if(CurTime() - rtTime >= 1) then
  29.         draw.RoundedBox( 8, ScrW() / 2 + 5, 32, 5, 8, Color(255,0,0,255) )
  30.     end
  31.     if(CurTime() - rtTime >= 2) then
  32.         draw.RoundedBox( 8, ScrW() / 2 + 25, 32, 5, 8, Color(255,0,0,255) )
  33.     end
  34.     if(CurTime() - rtTime >= 3) then
  35.         draw.RoundedBox( 8, ScrW() / 2 + 45, 32, 5, 8, Color(255,0,0,255) )
  36.     end
  37.     if(CurTime() - rtTime >= 4) then
  38.         draw.RoundedBox( 8, ScrW() / 2 + 65, 32, 5, 8, Color(255,0,0,255) )
  39.     end
  40.     if(CurTime() - rtTime >= 5) then
  41.         draw.RoundedBox( 8, ScrW() / 2 + 85, 32, 5, 8, Color(255,0,0,255) )
  42.     end
  43.     if(CurTime() - rtTime >= 6) then
  44.         draw.RoundedBox( 8, ScrW() / 2 + 105, 32, 5, 8, Color(255,0,0,255) )
  45.     end
  46.     if(CurTime() - rtTime >= 7) then
  47.         draw.RoundedBox( 8, ScrW() / 2 + 125, 32, 5, 8, Color(255,0,0,255) )
  48.     end
  49.     if(CurTime() - rtTime >= 8) then
  50.         draw.RoundedBox( 8, ScrW() / 2 + 145, 32, 5, 8, Color(255,0,0,255) )
  51.         rtTime = CurTime()
  52.     end
  53.    
  54.    
  55.    
  56.     if(showControls) then
  57.     draw.RoundedBox( 8, 0, ScrH() *.65, ScrW(), ScrH(), Color(0,0,0,155) )
  58.  
  59.         hty = ScrH() * .7
  60.         for i = 1, table.getn(buildToolTip) do
  61.             draw.DrawText( buildToolTip[i] , "ScoreboardText", ScrW() * .5, hty, Color(255,255,255,255),0)
  62.             hty = hty + 20
  63.         end
  64.    
  65.         hty = ScrH() * .7
  66.         for i = 1, table.getn(militaryToolTip) do
  67.             draw.DrawText( militaryToolTip[i] , "ScoreboardText", 40, hty, Color(255,255,255,255),0)
  68.             hty = hty + 20
  69.         end
  70.     end
  71.    
  72.    
  73.    
  74.     for k, v in pairs(player.GetAll()) do
  75.         table.insert(aPlayers, v:UserID() .. " " .. v:Nick())
  76.     end
  77.    
  78.     yAdj = 60
  79.    
  80.     for i = 1, table.getn(aPlayers) do
  81.         draw.DrawText( aPlayers[i] , "ScoreboardText", ScrW() - 200, yAdj, Color(255,255,255,255),0)
  82.         yAdj = yAdj + 20
  83.     end
  84.    
  85.    
  86.    
  87.     if(helpMe) then
  88.         draw.RoundedBox( 8, 0, 0, ScrW(), ScrH(), Color(50,50,75,100) )
  89.         hty = 160
  90.         for i = 1, table.getn(HelpText) do
  91.             draw.DrawText( HelpText[i] , "ScoreboardText", ScrW() / 8, hty, Color(255,255,255,255),0)
  92.             hty = hty + 20
  93.         end
  94.     end
  95.    
  96.     if(dispVicScreen) then
  97.         draw.RoundedBox( 8, 0, 0, ScrW(), ScrH(), Color(0,0,0,255) )
  98.         draw.DrawText( winnerNick .. " has won the round!", "ScoreboardText", ScrW() /2, ScrH()/2, Color(255,255,255,255),1)
  99.         draw.DrawText( "He will go into the history books as " .. winnerNickTitle , "ScoreboardText", ScrW() /2, ScrH()/2 + 18, Color(255,255,255,255),1)
  100.         draw.DrawText( "for his victory over " .. winnerNickDescription, "ScoreboardText", ScrW() /2, ScrH()/2 + 36, Color(255,255,255,255),1)
  101.  
  102.        
  103.     end
  104.    
  105.     aPlayers = {}
  106.    
  107.     end
  108.    
  109. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement