I need to add the ulx group of each player under their name, their group should appear a bit smaller than the player name. But i don't exactly know how to do it. Any help ?
[Lua]if(SERVER) then
hook.Add("Initialize", "NamesOnHead", function()
AddCSLuaFile();
--[[
local function addAllFiles(path)
local f,d = file.Find(path.."/*","GAME")
for _,v in pairs(f) do
resource.AddFile(path.."/"..v)
end
for _,v in pairs(d) do
addAllFiles(path.."/"..v)
end
end
addAllFiles("materials/countryicons16")
resource.AddFile("resource/fonts/angrybirds.ttf");
]]--
util.AddNetworkString("sendCountry");
net.Receive("sendCountry", function(_, cl)
cl:SetNWString("country", net.ReadString() or "");
end)
end)
return;
else
CreateClientConVar("namesonhead_textsize", 50, true, false)
CreateClientConVar("namesonhead_flagsize", 3, true, false)
CreateClientConVar("namesonhead_mode", 0, true, false)
local fontSize = GetConVarNumber("namesonhead_textsize") or 50
local function loadFont(m_size)
surface.CreateFont("NamesOnHead", {
font = "AngryBirds",
size = m_size
});
end
local function repeatFunc()
local country = string.lower(system.GetCountry() or "")
if(LocalPlayer():GetNWString("country") == "" and country!="") then
net.Start("sendCountry")
net.WriteString(country)
net.SendToServer();
timer.Simple(5, repeatFunc)
end
end
local me = LocalPlayer();
local function initializeNamesOnHead()
me = LocalPlayer();
fontSize = GetConVarNumber("namesonhead_textsize") or 50
loadFont(fontSize)
repeatFunc()
end
hook.Add("InitPostEntity", "NamesOnHead", initializeNamesOnHead);
local function paintNamesOnHead3D()
if(!me or !IsValid(me)) then
me = LocalPlayer();
return
end
surface.SetFont("NamesOnHead");
local ang = me:EyeAngles()
ang:RotateAroundAxis(ang:Up(), -90)
ang:RotateAroundAxis(ang:Forward(), 90)
ang:RotateAroundAxis(ang:Right(), 0)
for k,v in pairs(player.GetAll()) do
if(v == me) then
continue
end
local country = v:GetNWString("country");
local pos = Vector(0,0,0)
local material;
if(not country or country == "") then
material = Material("icon16/help.png");
else
material = Material("materials/countryicons16/"..country..".png");
end
local textWidth = surface.GetTextSize(v:Name())
cam.Start3D2D(v:GetPos()+Vector(0,0,80), ang, 0.1);
surface.SetMaterial(material);
surface.SetDrawColor(Color(255,255,255,alpha))
local flagSize = GetConVarNumber("namesonhead_flagsize") or 3
surface.DrawTexturedRect( pos.x-textWidth/2-16*(flagSize+1), pos.y-11*(flagSize/2)-20 , 16*flagSize ,11*flagSize)
local colorText = team.GetColor(v:Team())
draw.SimpleTextOutlined(v:Name(), "NamesOnHead", pos.x, pos.y-20, colorText, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 2,Color(0,0,0, alpha) )
cam.End3D2D();
end
end
local function paintNamesOnHeadHud()
if(!me or !IsValid(me)) then
me = LocalPlayer();
return
end
surface.SetFont("NamesOnHead");
for k,v in pairs(player.GetAll()) do
if(v == me) then
continue
end
local country = v:GetNWString("country");
local pos = (v:GetPos() + Vector(0,0,80)):ToScreen()
local material;
if(not country or country == "") then
material = Material("icon16/help.png");
else
material = Material("materials/countryicons16/"..country..".png");
end
local textWidth = surface.GetTextSize(v:Name())
local alpha = 255-math.Clamp(v:GetPos():Distance(me:GetPos())*0.25,0,255)
surface.SetMaterial(material);
surface.SetDrawColor(Color(255,255,255,alpha))
local flagSize = GetConVarNumber("namesonhead_flagsize") or 3
surface.DrawTexturedRect( pos.x-textWidth/2-16*(flagSize+1), pos.y-11*(flagSize/2)-20 , 16*flagSize ,11*flagSize)
local colorText = team.GetColor(v:Team())
colorText.a = alpha
draw.SimpleTextOutlined(v:Name(), "NamesOnHead", pos.x, pos.y-20, colorText, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 2,Color(0,0,0, alpha) )
end
end
local lastMode = nil
hook.Add("Think", "NamesOnHead", function()
local curFontSize = GetConVarNumber("namesonhead_textsize") or 50
if(curFontSize ~= fontSize) then
loadFont(curFontSize)
end
local curMode = GetConVarNumber("namesonhead_mode") or 0
if(lastMode ~= curMode) then
if(curMode== 1) then
hook.Add("PostDrawTranslucentRenderables", "NamesOnHead", paintNamesOnHead3D);
hook.Remove("HUDPaint", "NamesOnHead")
else
hook.Add("HUDPaint", "NamesOnHead", paintNamesOnHeadHud);
hook.Remove("PostDrawTranslucentRenderables", "NamesOnHead")
end
lastMode = curMode
end
end)
end[/lua]
Is there anything other then errors in hooks that can cause physics to break? (Stuff falling through the map ect)
How can i prevent DTextEntry to going to the new line.
Here is what i mean, when the text is at the end of the line, the next word will be at the next line, it will show at the next line but when checking the text with GetValue() there is no \n
It just make a new line, show up at a new line but it's not a real one (Because no \n )
So how can i stop the auto new line or automatically add a real \n ?
[lua]
local TextEntry = vgui.Create( "DTextEntry", Frame ) -- create the form as a child of frame
TextEntry:SetPos( 25, 25 )
TextEntry:SetSize( 1000-50, 700-50 )
TextEntry:SetMultiline( true )
TextEntry:SetHeight(700-50);
TextEntry:SetFont( "Whiteboardfont3" ) // not going to work for ya
TextEntry:SetText( ent:GetTexte()) // not going to work for ya
TextEntry:SetUpdateOnType( true )
TextEntry.m_bLoseFocusOnClickAway = false
TextEntry:SizeToContents();
[/lua]
TL;DR : At the end of the line of DTextEntry, it will auto go to the new line but without a real \n, it just show as a new line but without a \n when checking with GetValue(), how to prevent/fix that
[QUOTE=ExtReMLapin;48943604]
TL;DR : At the end of the line of DTextEntry, it will auto go to the new line but without a real \n, it just show as a new line but without a \n when checking with GetValue(), how to prevent/fix that[/QUOTE]
Set TextEntry:SetMultiline( true ) to false.
Yeah but i need to write on more than one line dude :v:
[QUOTE=ExtReMLapin;48943997]Yeah but i need to write on more than one line dude :v:[/QUOTE]
You started your question with "How do I disable wrapping in a DTextEntry".
What are you trying to do to where you need \n's inserted in the text?
[QUOTE=DeathWard;48944107]You started your question with "How do I disable wrapping in a DTextEntry".
What are you trying to do to where you need \n's inserted in the text?[/QUOTE]
The text i'm using in DTextEntry is going to be used on a 3D2D panel, so if i got "5 lines" on the DTextEntry i need to get 5 lines (So 4 or 5 \n) on the text sent to the 3D2D panel.
BUT The DTextEntry can show 10 lines without having 9-10 \n at all. Because if the line you're typing to too big it will put the chars at the next line without puting a \n at all.
The text the playing is typing is going to look right but when setting it on the 3D2D text, it will looks wrong because some \n he saw on the Panel are not real.
[QUOTE=ExtReMLapin;48944280]The text i'm using in DTextEntry is going to be used on a 3D2D panel, so if i got "5 lines" on the DTextEntry i need to get 5 lines (So 4 or 5 \n) on the text sent to the 3D2D panel.
BUT The DTextEntry can show 10 lines without having 9-10 \n at all. Because if the line you're typing to too big it will put the chars at the next line without puting a \n at all.
The text the playing is typing is going to look right but when setting it on the 3D2D text, it will looks wrong because some \n he saw on the Panel are not real.[/QUOTE]
There's plenty of examples of how to do word wrapping with lua out there.
You can just run your string through a new function when you put it in your 3D2D text.
[CODE]
local function WordWrap(str, limit)
limit = limit or 72
local here = 1
local buf = ""
local t = {}
str:gsub("(%s*)()(%S+)()",
function(sp, st, word, fi)
if fi-here > limit then
--# Break the line
here = st
table.insert(t, buf)
buf = word
else
buf = buf..sp..word --# Append
end
end)
--# Tack on any leftovers
if(buf ~= "") then
table.insert(t, buf)
end
local result = ""
for k,v in pairs(t) do
result = result..v.."\n"
end
return result
end
[/CODE]
You can then just run
[CODE]WordWrap(string, total chars)[/CODE]
to get the spaced text.
[CODE]local test = WordWrap("A lot of text you want to wrap.", 24)
print(test)
--This returns
A lot of text you want
to wrap.[/CODE]
[QUOTE=DeathWard;48944459]There's plenty of examples of how to do word wrapping with lua out there.
You can just run your string through a new function when you put it in your 3D2D text.
[CODE]
local function WordWrap(str, limit)
limit = limit or 72
local here = 1
local buf = ""
local t = {}
str:gsub("(%s*)()(%S+)()",
function(sp, st, word, fi)
if fi-here > limit then
--# Break the line
here = st
table.insert(t, buf)
buf = word
else
buf = buf..sp..word --# Append
end
end)
--# Tack on any leftovers
if(buf ~= "") then
table.insert(t, buf)
end
local result = ""
for k,v in pairs(t) do
result = result..v.."\n"
end
return result
end
[/CODE]
You can then just run
[CODE]WordWrap(string, total chars)[/CODE]
to get the spaced text.
[CODE]local test = WordWrap("A lot of text you want to wrap.", 24)
print(test)
--This returns
A lot of text you want
to wrap.[/CODE][/QUOTE]
Thanks a lot dude, I owe you one.
Does [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/EntityNetworkedVarChanged]GM/EntityNetworkedVarChanged[/url] not work clientside for anyone else?
How can I find the names of all defined particle systems inside a .pcf file?
[QUOTE=Z0mb1n3;48945686]How can I find the names of all defined particle systems inside a .pcf file?[/QUOTE]
Open it up in EP2 with the particle tool parameters, it's on the Valve Wiki.
[QUOTE=Revenge282;48946681]Open it up in EP2 with the particle tool parameters, it's on the Valve Wiki.[/QUOTE]
Pretty sure there might be a better way. Take a look how Particle Emitter tool does it on Workshop.
[QUOTE=DamienTehDemo;48931353][IMG]http://images.akamai.steamusercontent.com/ugc/639867885566497338/449985AFE52DB09817243CB383B69FEB756EE575/[/IMG]
Having some problems with render view. It seems to only be rendering the skybox and effects, anyone know why? :S
[CODE]function HUDPaint()
client = LocalPlayer()
--- Sticky Camera---
--------------------
surface.SetDrawColor( 255, 255, 255, 255 )
surface.SetMaterial( armormat ) -- If you use Material, cache it!
surface.DrawTexturedRect( (ScrW()/2)-150,25, 300, 75 )
local w,h = draw.SimpleTextOutlined( timervar, "HudTimer", 900*( ScrW() / 1920),60*( ScrH() / 1080),Color(152,218,217),0,0,0.5,Color(150,150,150) )
if(client:Alive() && client:GetNWBool("inGame"))then
client=LocalPlayer()
camera = client:GetNWEntity("stickyCamera")
if( camera:IsValid())then
local CamData = {} //just the top down view from the wiki
CamData.angles = camera:GetAngles()
CamData.origin = camera:GetPos()
CamData.aspectratio = ScrW()/ScrH()
CamData.x = 0
CamData.y = 0
CamData.w = 0
CamData.h = 0
CamData.dopostprocess = true
CamData.drawhud = false
CamData.drawmonitors = true
CamData.drawviewmodel = true
rendering_cam = true
CamData.fov = 40
CamData.viewmodelfov = 30
local OldRT = render.GetRenderTarget()
render.SetRenderTarget( rt )
render.RenderView( CamData )
render.SetRenderTarget( OldRT )
draw.RoundedBox( 1, panel_x, panel_y, panel_h, panel_w, Color( 255, 255, 255, 100 ) )
surface.SetMaterial( mat )
surface.SetDrawColor( 255, 255, 255, 200 )
surface.DrawTexturedRect( panel_x, panel_y, panel_w, panel_h )
rendering_cam = false
print("valid")
else
print("invalid")
end
[/CODE][/QUOTE]
[QUOTE=DamienTehDemo;48945142][IMG]https://i.gyazo.com/015b7f510a2c406dc625e1c1a1429f75.png[/IMG]
Update ^
Not sure if progress or if it will help you determine wtf is going on
Found out that
[CODE]
render.ClearDepth()[/CODE]
Is whats going made my arm models appear but make wierd shapes in the cam, so ye.[/QUOTE]
[QUOTE=Robotboy655;48945020][url]http://wiki.garrysmod.com/page/GM/PreDrawPlayerHands[/url]
[url]http://wiki.garrysmod.com/page/GM/PostDrawPlayerHands[/url]
The functions are all the same.[/QUOTE]
[QUOTE=DamienTehDemo;48945037]Oh i was using
[CODE]LocalPlayer():GetViewModel():SetMaterial("models/effects/comball_sphere")
LocalPlayer():GetViewModel():SetColor(Color(0, 0, 0,0))
[/CODE]
thanks for shwoing me these functions :3
solved that issue but now what about the world models
--Edit
Alright so those functions you gave me arent doing what i thought they did, im trying to set the entitys materials and colors like i did above but its not working
[CODE] hook.Add("PostDrawPlayerHands","cloakingViewModel", function(hands,vm,ply,wep)
if(ply:GetNWBool("cloakingEnabled"))then
if(ply:GetNWBool("cloakingEnabledFlash"))then
hands:SetMaterial("models/effects/comball_sphere")
hands:SetColor(Color(255, 255, 255,255))
vm:SetMaterial("models/effects/comball_sphere")
vm:SetColor(Color(255, 255, 255,255))
else
hands:SetMaterial("models/effects/comball_sphere")
hands:SetColor(Color(0, 0, 0,0))
vm:SetMaterial("models/effects/comball_sphere")
vm:SetColor(Color(0, 0, 0,0))
end
else
hands:SetColor(Color(255, 255, 255,255))
hands:SetMaterial(nil)
vm:SetColor(Color(255, 255, 255,255))
vm:SetMaterial(nil)
end
end)[/CODE][/QUOTE]
Reposting here cause apparently i putem in wrong place first time :c Sorry! Uh, along with these problems i was wondering how TTT works with maps to be able to know where weapon spawns are and such
[QUOTE=DamienTehDemo;48946784]i was wondering how TTT works with maps to be able to know where weapon spawns are and such[/QUOTE]
I don't have an answer for your other problem, but TTT has three ways of adding weapons.
It first searches for a rearm script, assuming the convar is enabled. TTT lets you load in txt files with weapon spawn locations, which the gamemode parses and just spawns as a table.
If there's no rearm script, it'll look for actual weapon_ttt spawn positions in the map, as actual hammer entities.
If both of those have no result, it'll use the T/CT spawn positions, along with other random hammer entities on CSS maps to randomly spawn weapons where players spawn.
Take a look through terrortown/gamemode/ent_replace.lua to see specifically how it does it.
[QUOTE=Nekomi;48934423]I need to add the ulx group of each player under their name, their group should appear a bit smaller than the player name. But i don't exactly know how to do it. Any help ?
[Lua]if(SERVER) then
hook.Add("Initialize", "NamesOnHead", function()
AddCSLuaFile();
--[[
local function addAllFiles(path)
local f,d = file.Find(path.."/*","GAME")
for _,v in pairs(f) do
resource.AddFile(path.."/"..v)
end
for _,v in pairs(d) do
addAllFiles(path.."/"..v)
end
end
addAllFiles("materials/countryicons16")
resource.AddFile("resource/fonts/angrybirds.ttf");
]]--
util.AddNetworkString("sendCountry");
net.Receive("sendCountry", function(_, cl)
cl:SetNWString("country", net.ReadString() or "");
end)
end)
return;
else
CreateClientConVar("namesonhead_textsize", 50, true, false)
CreateClientConVar("namesonhead_flagsize", 3, true, false)
CreateClientConVar("namesonhead_mode", 0, true, false)
local fontSize = GetConVarNumber("namesonhead_textsize") or 50
local function loadFont(m_size)
surface.CreateFont("NamesOnHead", {
font = "AngryBirds",
size = m_size
});
end
local function repeatFunc()
local country = string.lower(system.GetCountry() or "")
if(LocalPlayer():GetNWString("country") == "" and country!="") then
net.Start("sendCountry")
net.WriteString(country)
net.SendToServer();
timer.Simple(5, repeatFunc)
end
end
local me = LocalPlayer();
local function initializeNamesOnHead()
me = LocalPlayer();
fontSize = GetConVarNumber("namesonhead_textsize") or 50
loadFont(fontSize)
repeatFunc()
end
hook.Add("InitPostEntity", "NamesOnHead", initializeNamesOnHead);
local function paintNamesOnHead3D()
if(!me or !IsValid(me)) then
me = LocalPlayer();
return
end
surface.SetFont("NamesOnHead");
local ang = me:EyeAngles()
ang:RotateAroundAxis(ang:Up(), -90)
ang:RotateAroundAxis(ang:Forward(), 90)
ang:RotateAroundAxis(ang:Right(), 0)
for k,v in pairs(player.GetAll()) do
if(v == me) then
continue
end
local country = v:GetNWString("country");
local pos = Vector(0,0,0)
local material;
if(not country or country == "") then
material = Material("icon16/help.png");
else
material = Material("materials/countryicons16/"..country..".png");
end
local textWidth = surface.GetTextSize(v:Name())
cam.Start3D2D(v:GetPos()+Vector(0,0,80), ang, 0.1);
surface.SetMaterial(material);
surface.SetDrawColor(Color(255,255,255,alpha))
local flagSize = GetConVarNumber("namesonhead_flagsize") or 3
surface.DrawTexturedRect( pos.x-textWidth/2-16*(flagSize+1), pos.y-11*(flagSize/2)-20 , 16*flagSize ,11*flagSize)
local colorText = team.GetColor(v:Team())
draw.SimpleTextOutlined(v:Name(), "NamesOnHead", pos.x, pos.y-20, colorText, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 2,Color(0,0,0, alpha) )
cam.End3D2D();
end
end
local function paintNamesOnHeadHud()
if(!me or !IsValid(me)) then
me = LocalPlayer();
return
end
surface.SetFont("NamesOnHead");
for k,v in pairs(player.GetAll()) do
if(v == me) then
continue
end
local country = v:GetNWString("country");
local pos = (v:GetPos() + Vector(0,0,80)):ToScreen()
local material;
if(not country or country == "") then
material = Material("icon16/help.png");
else
material = Material("materials/countryicons16/"..country..".png");
end
local textWidth = surface.GetTextSize(v:Name())
local alpha = 255-math.Clamp(v:GetPos():Distance(me:GetPos())*0.25,0,255)
surface.SetMaterial(material);
surface.SetDrawColor(Color(255,255,255,alpha))
local flagSize = GetConVarNumber("namesonhead_flagsize") or 3
surface.DrawTexturedRect( pos.x-textWidth/2-16*(flagSize+1), pos.y-11*(flagSize/2)-20 , 16*flagSize ,11*flagSize)
local colorText = team.GetColor(v:Team())
colorText.a = alpha
draw.SimpleTextOutlined(v:Name(), "NamesOnHead", pos.x, pos.y-20, colorText, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 2,Color(0,0,0, alpha) )
end
end
local lastMode = nil
hook.Add("Think", "NamesOnHead", function()
local curFontSize = GetConVarNumber("namesonhead_textsize") or 50
if(curFontSize ~= fontSize) then
loadFont(curFontSize)
end
local curMode = GetConVarNumber("namesonhead_mode") or 0
if(lastMode ~= curMode) then
if(curMode== 1) then
hook.Add("PostDrawTranslucentRenderables", "NamesOnHead", paintNamesOnHead3D);
hook.Remove("HUDPaint", "NamesOnHead")
else
hook.Add("HUDPaint", "NamesOnHead", paintNamesOnHeadHud);
hook.Remove("PostDrawTranslucentRenderables", "NamesOnHead")
end
lastMode = curMode
end
end)
end[/lua][/QUOTE]
Hello,
I was trying to get values out of [URL="http://wiki.garrysmod.com/page/Category:CMoveData"]CMoveData[/URL] in c++.
In specific [URL="http://wiki.garrysmod.com/page/CMoveData/GetAngles"]CMoveData/GetAngles[/URL]. I have however no clue how to do this. Can anyone give a small example on how to?
I am currently pushing the angle itself into the c++ function. [CODE]UserData *ang = (UserData *)LUA->GetUserdata(1);[/CODE]
But I want to get the angle from the CMoveData itself.
Thanks.
[QUOTE=darkjacky;48950965]Hello,
I was trying to get values out of [URL="http://wiki.garrysmod.com/page/Category:CMoveData"]CMoveData[/URL] in c++.
In specific [URL="http://wiki.garrysmod.com/page/CMoveData/GetAngles"]CMoveData/GetAngles[/URL]. I have however no clue how to do this. Can anyone give a small example on how to?
I am currently pushing the angle itself into the c++ function. [CODE]UserData *ang = (UserData *)LUA->GetUserdata(1);[/CODE]
But I want to get the angle from the CMoveData itself.
Thanks.[/QUOTE]
You probably don't need to get the actual userdata, and can instead save a reference to it or just get the individual values you need.
Gonna need to see more code or hear exactly what you're trying to do, because there's not much to go off of.
How to rotate ent physics to angle?
[lua]
local phys = ent:GetPhysicsObject()
local angleto = Angle(0,90,0)
-- Rotate physics without SetAngles.
[/lua]
Any reason r_lod 3-5, r_drawdecals, r_drawparticles is only available when sv_cheats is on?
Seems pretty useless.
I should be able to check if a vector is inside a Mesh() somehow, right?
Just feels like it would be like an A4 full of code for it.
How could I go with drawing the current weapon's selection icon on the HUD?
What's the max string length on a setpdata function? Google tells me the SQLite default is 1mb, but I don't know if it's set to a smaller value on a gmod server.
[QUOTE=DeathWard;48955308]What's the max string length on a setpdata function? Google tells me the SQLite default is 1mb, but I don't know if it's set to a smaller value on a gmod server.[/QUOTE]
why
This may seem like a dumb question, but why do people do this when making tables that methods will be called on?
[code]
local tab = {}
tab.__index = tab
[/code]
Also, I might as well bump this while I'm making a post:
[QUOTE=AK to Spray;48945474]Does [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/EntityNetworkedVarChanged]GM/EntityNetworkedVarChanged[/url] not work clientside for anyone else?[/QUOTE]
[QUOTE=AK to Spray;48959391]This may seem like a dumb question, but why do people do this when making tables that methods will be called on?
[code]
local tab = {}
tab.__index = tab
[/code]
[/QUOTE]
Because methods are looked up in a table stored in the __index field of a metatable, not just in the metatable itself. This just allows you to define methods in metatable itself without fiddling with __index.
-snip- late
I'm about to make my first TTT Scoreboard.
I'm wondering how to check whether a player is spectator, dead etc. Also, how can I get whether the player has been identified and how to get the informstion, like death reason etc?
I think the last question would be how to use the Tag System? (Friend, avoid,...)
I googled for help making a TTT scoreboard, but I didn't found anything.
[QUOTE=P4sca1;48960202]I'm about to make my first TTT Scoreboard.
I'm wondering how to check whether a player is spectator, dead etc. Also, how can I get whether the player has been identified and how to get the informstion, like death reason etc?
I think the last question would be how to use the Tag System? (Friend, avoid,...)
I googled for help making a TTT scoreboard, but I didn't found anything.[/QUOTE]
Spectator:
if ply:Team() == TEAM_SPECTATOR then ... end
Dead:
if 0 >= ply:Health() then ... end
also here's the vanilla ttt scoreboard source if that's any help:
[url="https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/terrortown/gamemode/vgui/sb_info.lua"]sb_info.lua[/url]
[url="https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/terrortown/gamemode/vgui/sb_main.lua]sb_main.lua[/url]
[url="https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/terrortown/gamemode/vgui/sb_row.lua"]sb_row.lua[/url]
[url="https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/terrortown/gamemode/vgui/sb_team.lua"]sb_team.lua[/url]
[QUOTE=PaX_;48961845]Spectator:
if ply:Team() == TEAM_SPECTATOR then ... end
Dead:
if 0 >= ply:Health() then ... end
also here's the vanilla ttt scoreboard source if that's any help:
[url="https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/terrortown/gamemode/vgui/sb_info.lua"]sb_info.lua[/url]
[url="https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/terrortown/gamemode/vgui/sb_main.lua]sb_main.lua[/url]
[url="https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/terrortown/gamemode/vgui/sb_row.lua"]sb_row.lua[/url]
[url="https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/terrortown/gamemode/vgui/sb_team.lua"]sb_team.lua[/url][/QUOTE]
Thanks!
Also, I found this on the GMod Wiki: [url]http://wiki.garrysmod.com/page/Basic_scoreboard_creation[/url]
I'm wondering how to hide the default scoreboard and only show mine?
Sorry, you need to Log In to post a reply to this thread.