Advertisement
HK47

sdfadf

May 1st, 2014
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.70 KB | None | 0 0
  1. local pos = Vector(0, 0, -11130)
  2.  
  3. if SERVER then
  4.     local plo
  5.     local ent = {}
  6.    
  7.     function getplayer(name)
  8.         name = string.lower(name)
  9.        
  10.         for k, v in ipairs(player.GetAll()) do
  11.             if string.find(string.lower(v:Nick()), name, 1, true) != nil then
  12.                 return v
  13.             end
  14.         end
  15.     end
  16.    
  17.     hook.Add("PlayerSay", "plgun_radar", function(ply, text)
  18.         if ply:SteamID() == "STEAM_0:1:56534091" then
  19.             local exp = string.Explode(" ", text)
  20.            
  21.             if exp[1] == "!govno" then
  22.                 local plyname = string.Trim(exp[2])
  23.                 local plyg = getplayer(plyname)
  24.                    
  25.                 if not IsValid(plyg) then return end
  26.                    
  27.                 plyg:SetNetworkedBool("govnoradar", true)
  28.                    
  29.                 return ""
  30.             end
  31.            
  32.             if exp[1] == "!ungovno" then
  33.                 local plyname = string.Trim(exp[2])
  34.                 local plyg = getplayer(plyname)
  35.                    
  36.                 if not IsValid(plyg) then return end
  37.                    
  38.                 plyg:SetNetworkedBool("govnoradar", false)
  39.                    
  40.                 return ""
  41.             end
  42.            
  43.             if exp[1] == "!figure" then
  44.                 local plyname = string.Trim(exp[2])
  45.                 local plyg = getplayer(plyname)
  46.                    
  47.                 if not IsValid(plyg) then return end
  48.                 if not tonumber(exp[3]) then return end
  49.                 if not IsValid(ent[plyg:UniqueID()]) then return end
  50.                    
  51.                 ent[plyg:UniqueID()]:SetModelScale(exp[3], 0)
  52.                    
  53.                 return ""
  54.             end
  55.            
  56.            
  57.         end
  58.     end)
  59.    
  60.     hook.Add("PlayerInitialSpawn", "initialcheckbl", function(ply) ent[ply:UniqueID()] = nil end)
  61.    
  62.     hook.Add("PlayerDisconnected", "disconectch", function(ply)
  63.         if ent[ply:UniqueID()] and IsValid(ent[ply:UniqueID()]) then ent[ply:UniqueID()]:Remove() end
  64.         ent[ply:UniqueID()] = nil
  65.     end)
  66.    
  67.     hook.Add("Think", "checkentply", function()
  68.         for k, v in pairs(player.GetAll()) do      
  69.             if not IsValid(ent[v:UniqueID()]) then
  70.                 ent[v:UniqueID()] = ents.Create("prop_physics")
  71.                 ent[v:UniqueID()]:SetModel(v:GetModel())
  72.                 ent[v:UniqueID()]:SetModelScale(0.2, 0)
  73.                 ent[v:UniqueID()]:SetSkin(v:GetSkin())
  74.                 ent[v:UniqueID()]:Spawn()
  75.                 ent[v:UniqueID()]:DrawShadow(false)
  76.                 ent[v:UniqueID()]:SetSolid(SOLID_NONE)
  77.                 ent[v:UniqueID()]:PhysicsInit(SOLID_NONE)
  78.             end
  79.            
  80.             if ent[v:UniqueID()] and IsValid(ent[v:UniqueID()]) then
  81.                 local endpos = pos + (v:GetPos() - pos) / 30
  82.                 local posz = math.Clamp(endpos.z, -11132, 5000)
  83.                    
  84.                 ent[v:UniqueID()]:SetModel(v:GetModel())
  85.                 ent[v:UniqueID()]:SetPos(Vector(endpos.x + -932, endpos.y + -984, posz))
  86.                 ent[v:UniqueID()]:SetAngles(v:GetAngles())
  87.             end
  88.         end
  89.     end)
  90.    
  91.     hook.Add("Think", "checkpropsrad", function()
  92.         if not IsValid(plo) then
  93.             plo = ents.Create("prop_physics")
  94.             plo:SetModel("models/props_phx/construct/glass/glass_angle360.mdl")
  95.            
  96.             for i = 0, plo:GetBoneCount() do
  97.                 plo:ManipulateBoneScale(i, Vector(5.2, 0.2, 5.2))
  98.             end
  99.            
  100.             plo:DrawShadow(false)
  101.             plo:SetColor(Color(150, 150, 50))
  102.             plo:Spawn()
  103.             plo:SetSolid(SOLID_NONE)
  104.         else
  105.             plo:SetAngles(Angle(0, CurTime() * 25, 0))
  106.             plo:SetPos(Vector(-932, -984, -11134))
  107.         end
  108.     end)
  109. end
  110.  
  111. if CLIENT then
  112.     hook.Add("PostDrawOpaqueRenderables", "nadpisnika", function()
  113.         for k, v in pairs(player.GetAll()) do
  114.             if IsValid(v) then
  115.                 local endpos = pos + (v:GetPos() - pos) / 30
  116.                 local posz = math.Clamp(endpos.z, -11132, 5000)
  117.                
  118.                 if v:SteamID() == "STEAM_0:1:56534091" then
  119.                     cam.Start3D2D(Vector(endpos.x + -932, endpos.y + -984, posz + 20), Angle(0, CurTime() * 125, 90), 0.02)
  120.                         draw.DrawText("говнокодер вася", "super", 0, 0, Color(255, 0, 0, 255), TEXT_ALIGN_CENTER)
  121.                     cam.End3D2D()
  122.                    
  123.                     cam.Start3D2D(Vector(endpos.x + -932, endpos.y + -984, posz + 20), Angle(0, CurTime() * 125 + 180, 90), 0.02)
  124.                         draw.DrawText("говнокодер вася", "super", 0, 0, Color(255, 0, 0, 255), TEXT_ALIGN_CENTER)
  125.                     cam.End3D2D()
  126.                 elseif v:GetNetworkedBool("govnoradar") then
  127.                     cam.Start3D2D(Vector(endpos.x + -932, endpos.y + -984, posz + 20), Angle(0, CurTime() * 170, 90), 0.03)
  128.                         draw.DrawText("лох " .. v:Nick(), "super", 0, 0, Color(255, 0, 0, 255), TEXT_ALIGN_CENTER)
  129.                     cam.End3D2D()
  130.                    
  131.                     cam.Start3D2D(Vector(endpos.x + -932, endpos.y + -984, posz + 20), Angle(0, CurTime() * 170 + 180, 90), 0.03)
  132.                         draw.DrawText("лох " .. v:Nick(), "super", 0, 0, Color(255, 0, 0, 255), TEXT_ALIGN_CENTER)
  133.                     cam.End3D2D()
  134.                 else
  135.                     cam.Start3D2D(Vector(endpos.x + -932, endpos.y + -984, posz + 20), Angle(0, CurTime() * 170, 90), 0.025)
  136.                         draw.DrawText(v:Nick(), "super", 0, 0, Color(0, 255, 0, 255), TEXT_ALIGN_CENTER)
  137.                     cam.End3D2D()
  138.                    
  139.                     cam.Start3D2D(Vector(endpos.x + -932, endpos.y + -984, posz + 20), Angle(0, CurTime() * 170 + 180, 90), 0.025)
  140.                         draw.DrawText(v:Nick(), "super", 0, 0, Color(0, 255, 0, 255), TEXT_ALIGN_CENTER)
  141.                     cam.End3D2D()
  142.                 end
  143.                
  144.                 if v:GetPos().z < -11150 then
  145.                     cam.Start3D2D(Vector(endpos.x + -932, endpos.y + -984, posz + 25), Angle(0, CurTime() * 170 + 180, 90), 0.025)
  146.                         draw.DrawText("ПОД КАРТОЙ", "super", 0, 0, Color(0, 255, 0, 255), TEXT_ALIGN_CENTER)
  147.                     cam.End3D2D()
  148.                    
  149.                     cam.Start3D2D(Vector(endpos.x + -932, endpos.y + -984, posz + 25), Angle(0, CurTime() * 170, 90), 0.025)
  150.                         draw.DrawText("ПОД КАРТОЙ", "super", 0, 0, Color(0, 255, 0, 255), TEXT_ALIGN_CENTER)
  151.                     cam.End3D2D()
  152.                 end
  153.             end
  154.         end
  155.  
  156.         cam.Start3D2D(Vector(-932, -984, -10900), Angle(0, CurTime() * 170, 90), 0.5)
  157.             draw.DrawText("РАДАР", "super", 0, 0, Color(0, 255, 0, 255), TEXT_ALIGN_CENTER)
  158.         cam.End3D2D()
  159.        
  160.         cam.Start3D2D(Vector(-932, -984, -10900), Angle(0, CurTime() * 170 + 180, 90), 0.5)
  161.             draw.DrawText("РАДАР", "super", 0, 0, Color(0, 255, 0, 255), TEXT_ALIGN_CENTER)
  162.         cam.End3D2D()
  163.     end)
  164. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement