hook.Add('HUDPaint', 'retaded_esp', function()
for k, v in pairs(ents.GetAll()) do
if v:IsPlayer() then
if v:Alive() and v:GetPos() != Vector(0, 0, 0) then
local pos1 = v:GetPos() + Vector(0, 0, 64);
local pos2 = (pos1 + Vector(0, 0, 10)):ToScreen();
local trace = {}
trace.start = OurPos
trace.endpos = pos1
trace.filter = {LocalPlayer(), v};
local tr = util.TraceLine( trace )
if v:IsAdmin() then
draw.SimpleText(v:Nick(), 'Trebuchet18', pos2.x, pos2.y, Color(255, 0, 0,255), 1, 1, 1)
draw.SimpleText("HP: "..v:Health(), 'Trebuchet18', pos2.x, pos2.y + 9, Color(255, 0, 0,255), 1, 1, 1)
draw.SimpleText((math.Round(LocalPlayer():GetPos():Distance(v:GetPos())/39.37).." m"), 'Trebuchet18', pos2.x, pos2.y + 18, Color(255, 0, 0,255), 1, 1, 1)
elseif v:IsUserGroup("operator") then
draw.SimpleText(v:Nick(), 'Trebuchet18', pos2.x, pos2.y, Color(175, 175, 0,255), 1, 1, 1)
draw.SimpleText("HP: "..v:Health(), 'Trebuchet18', pos2.x, pos2.y + 9, Color(175, 175, 0,255), 1, 1, 1)
draw.SimpleText((math.Round(LocalPlayer():GetPos():Distance(v:GetPos())/39.37).." m"), 'Trebuchet18', pos2.x, pos2.y + 18, Color(175, 175, 0,255), 1, 1, 1)
else
draw.SimpleText(v:Nick(), 'Trebuchet18', pos2.x, pos2.y, Color(0, 255, 0,255), 1, 1, 1)
draw.SimpleText("HP: "..v:Health(), 'Trebuchet18', pos2.x, pos2.y + 9, Color(0, 255, 0,255), 1, 1, 1)
draw.SimpleText((math.Round(LocalPlayer():GetPos():Distance(v:GetPos())/39.37).." m"), 'Trebuchet18', pos2.x, pos2.y + 18, Color(0, 255, 0,255), 1, 1, 1)
end
end
end
if v:GetClass() == "aura_cash" then
local pos1 = v:GetPos() + Vector(0, 0, 0);
local pos2 = (pos1 + Vector(0, 0, 5)):ToScreen();
draw.SimpleText("Cash", 'Trebuchet18', pos2.x, pos2.y, Color(0, 0, 255,255), 1, 1, 1)
end
if v:GetClass() == "aura_item" then
local pos1 = v:GetPos() + Vector(0, 0, 0);
local pos2 = (pos1 + Vector(0, 0, 5)):ToScreen();
draw.SimpleText(v:GetModel(), 'Trebuchet18', pos2.x, pos2.y, Color(0, 0, 255,255), 1, 1, 1)
//local Sep = string.Explode("/", v:GetModel)
//for k2,v2 in pairs (Sep) do
//if (v2 == "weapon" or v2 == "weapons") then
//draw.SimpleText("Weapon", 'Trebuchet18', pos2.x, pos2.y, Color(255, 0, 0,255), 1, 1, 1)
//else
//draw.SimpleText(v:GetModel(), 'Trebuchet18', pos2.x, pos2.y, Color(255, 0, 0,255), 1, 1, 1)
//end
//end
end
if v:GetClass() == "aura_rationprinter" then
local pos1 = v:GetPos() + Vector(0, 0, 0);
local pos2 = (pos1 + Vector(0, 0, 5)):ToScreen();
draw.SimpleText("Money Printer", 'Trebuchet18', pos2.x, pos2.y, Color(0, 0, 255,255), 1, 1, 1)
end
if v:GetClass() == "aura_belongings" then
local pos1 = v:GetPos() + Vector(0, 0, 0);
local pos2 = (pos1 + Vector(0, 0, 5)):ToScreen();
draw.SimpleText("Belongings", 'Trebuchet18', pos2.x, pos2.y, Color(255, 0, 0,255), 1, 1, 1)
end
if v:GetClass() == "aura_rationproducer" then
local pos1 = v:GetPos() + Vector(0, 0, 0);
local pos2 = (pos1 + Vector(0, 0, 5)):ToScreen();
draw.SimpleText("Money Printer", 'Trebuchet18', pos2.x, pos2.y, Color(0, 0, 255,255), 1, 1, 1)
end
if v:GetClass() == "aura_shipment" then
local pos1 = v:GetPos() + Vector(0, 0, 0);
local pos2 = (pos1 + Vector(0, 0, 5)):ToScreen();
draw.SimpleText("Item Shipment", 'Trebuchet18', pos2.x, pos2.y, Color(0, 0, 255,255), 1, 1, 1)
end
if v:GetClass() == "aura_salesman" then
local pos1 = v:GetPos() + Vector(0, 0, 0);
local pos2 = (pos1 + Vector(0, 0, 5)):ToScreen();
draw.SimpleText("Salesman", 'Trebuchet18', pos2.x, pos2.y, Color(0, 0, 255,255), 1, 1, 1)
end
if v:GetClass() == "aura_propguarder" then
local pos1 = v:GetPos() + Vector(0, 0, 0);
local pos2 = (pos1 + Vector(0, 0, 5)):ToScreen();
draw.SimpleText("Prop Guarder", 'Trebuchet18', pos2.x, pos2.y, Color(0, 0, 255,255), 1, 1, 1)
end
if v:GetClass() == "aura_doorguarder" then
local pos1 = v:GetPos() + Vector(0, 0, 0);
local pos2 = (pos1 + Vector(0, 0, 5)):ToScreen();
draw.SimpleText("Door Guarder", 'Trebuchet18', pos2.x, pos2.y, Color(0, 0, 255,255), 1, 1, 1)
end
if v:GetClass() == "aura_rationguarder" then
local pos1 = v:GetPos() + Vector(0, 0, 0);
local pos2 = (pos1 + Vector(0, 0, 5)):ToScreen();
draw.SimpleText("Ration Guarder", 'Trebuchet18', pos2.x, pos2.y, Color(0, 0, 255,255), 1, 1, 1)
end
if v:GetClass() == "aura_safebox" then
local pos1 = v:GetPos() + Vector(0, 0, 0);
local pos2 = (pos1 + Vector(0, 0, 5)):ToScreen();
draw.SimpleText("Safebox", 'Trebuchet18', pos2.x, pos2.y, Color(0, 0, 255,255), 1, 1, 1)
end
end
end)
local On = false
local Glow
function Night( on )
function think()
for k,v in pairs(ents.GetAll()) do
local sep = string.Explode("_",v:GetClass())
if sep[1] == "npc" or v:GetClass() == "player" then
if Glow then
v:SetMaterial("models/weapons/v_slam/new light1") end
end
if (sep[1] == "npc" or v:GetClass() == "player") and !on then
v:SetMaterial("") end
end
end
hook.Add("Think","ehyuj",think)
local mul
if on then mul = 1 On = true else mul = 0 On = false end
if on then
surface.PlaySound( "items/nvg_on.wav" ) else
surface.PlaySound( "items/nvg_off.wav" ) end
function Think()
local ply = LocalPlayer()
if ply:Crouching() then plyht = 32 else plyht = 64 end
local dlight = DynamicLight( ply:EntIndex() )
if ( dlight ) then
dlight.Pos = ply:GetPos()+Vector( 0,0,plyht )
dlight.r = 0
dlight.g = 1 * mul
dlight.b = 0
dlight.Brightness = 0.01
dlight.Size = 10000
dlight.Decay = 5
dlight.DieTime = CurTime() + 1
end
end
hook.Add( "Think", "Think", Think )
local function ArghItBurns()
DrawBloom( 0, 1, 2, 2, 2, 3, 5*mul, 5*mul, 5*mul )
end
hook.Add( "RenderScreenspaceEffects", "NoMoreEyesForYou!", ArghItBurns )
local function PUMPPPTEST()
local tab = {}
tab[ "$pp_colour_addr" ] = 0
tab[ "$pp_colour_addg" ] = 0
tab[ "$pp_colour_addb" ] = 0
tab[ "$pp_colour_brightness" ] = 0.005*mul
tab[ "$pp_colour_contrast" ] = 1
tab[ "$pp_colour_colour" ] = 1
tab[ "$pp_colour_mulr" ] = 0
tab[ "$pp_colour_mulg" ] = 0
tab[ "$pp_colour_mulb" ] = 0
DrawColorModify( tab )
end
hook.Add( "RenderScreenspaceEffects", "RenderColorModifyPOO", PUMPPPTEST )
end
function TogNight()
if On == true then On = false
elseif On == false then On = true end
Night( On )
end
concommand.Add( "nightvision", TogNight )
local GoodWeps = {
"hands",
"weapon_zipties",
"aura_hands",
"aura_keys",
"weapon_physgun",
"weapon_physcannon",
"aura_flashlight"
};
local SpecWeps = {
"gmod_tool"
};
function ESPWeapons()
for k, v in pairs( player.GetAll() ) do
if( v == LocalPlayer() ) then return; end
local pos = v:EyePos():ToScreen();
local runy = pos.y;
for _, n in pairs( v:GetWeapons() ) do
if( table.HasValue( GoodWeps, n:GetClass() ) ) then continue; end
wepCol = Color( 255, 255, 255, 255 );
if( n == v:GetActiveWeapon() ) then
wepCol = Color( 255, 0, 0, 255 );
end
if( table.HasValue( SpecWeps, n:GetClass() ) ) then
wepCol = Color( 128, 128, 128, 255 );
end
local toPrint = "(" .. n:GetClass() .. ")";
if( n.PrintName ) then
toPrint = n.PrintName;
end
draw.DrawText( toPrint, "ChatFont", pos.x+5, runy, wepCol );
runy = runy + 12;
end
end
end
hook.Add( "HUDPaint", "ESPWeapons", ESPWeapons );