I need that whenever I click on the player the panel is displayed, where I can teleport to it, ban and so on, help me please, here is my code
[CODE]------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------ТАБ НАПИСАЛ Kydesn1k-------------------------------------------------------------------------
-------------------------------------------------------------Собстенновость l Relax l Новый Русский SCP-RP--------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local Scoreboard = nil
local PlayerListTop = nil
surface.CreateFont("ScoreBoardFont", {
font = "Cyrillic",
size = 16,
weight = 900,
blursize = 0,
scanlines = 0,
antialias = true,
extended = true,
})
surface.CreateFont("ScoreBoardTitleFont", {
font = "Cyrillic",
size = 25,
weight = 900,
blursize = 0,
scanlines = 0,
antialias = true,
extended = true,
})
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
commands = {}
local function addCommand( name, func )
commands[ name ] = func
end
addCommand( "Скопировать SteamID", function( pl ) SetClipboardText( pl:SteamID() ) end )
addCommand( "ТП к нему", function( pl ) RunConsoleCommand( "say", "!goto "..pl:Nick() ) end )
addCommand( "Тп к себе", function( pl ) RunConsoleCommand( "say", "!bring "..pl:Nick() ) end )
addCommand( "Вернуть", function( pl ) RunConsoleCommand( "say", "!return "..pl:Nick() ) end )
addCommand( "Фриз", function( pl ) RunConsoleCommand( "say", "!freeze "..pl:Nick() ) end )
addCommand( "Разфризить", function( pl ) RunConsoleCommand( "say", "!unfreeze "..pl:Nick() ) end )
UserGroupTitlesScoreboard = {}
UserGroupTitlesScoreboard["superadmin"] = "С"
UserGroupTitlesScoreboard["admin"] = "А"
UserGroupTitlesScoreboard["moderator"] = "М"
UserGroupTitlesScoreboard["user"] = ""
UserGroupTitlesScoreboard["admin_d"] = "А"
UserGroupTitlesScoreboard["superadmin_d"] = "СА"
UserGroupTitlesScoreboard["lpk"] = ""
UserGroupTitlesScoreboard["vip"] = ""
hook.Add( "ScoreboardShow", "SCP-SCOREBOARD", function(ply)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local function SteamToProfile(ply) -- Thanks decodaman
return 'http://steamcommunity.com/profiles/' .. (ply:SteamID64() or "BOT")
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local function blur(p,w,h)
local px, py = p:GetPos()
local blurTex = Material( "pp/blurscreen" )
blurTex:SetFloat( "$blur", 3 )
blurTex:Recompute()
render.UpdateScreenEffectTexture()
surface.SetMaterial( blurTex )
surface.SetDrawColor( 255, 255, 255, 255 )
surface.DrawTexturedRect( -px, -py, ScrW(), ScrH() )
surface.SetDrawColor( 0,0,0,60 )
surface.DrawRect( 0, 0, w, h )
surface.SetDrawColor( 120,120,120,120 )
surface.DrawOutlinedRect( 0, 0, w, h )
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if !IsValid(Scoreboard) then
local x,y = ScrW(), ScrH()
Scoreboard = vgui.Create("DFrame")
Scoreboard:SetSize(600,800)
Scoreboard:SetPos(x / 2 - 250,y - 600)
Scoreboard:SetTitle("")
local S = Scoreboard:GetSize()
Scoreboard:SetDraggable( false )
Scoreboard:ShowCloseButton( false )
Scoreboard:MoveTo(x / 2 - 250,y / 2 - 400,0.8, 0, 1)
Scoreboard.Paint = function(self, w, h)
blur(self,w,h)
surface.SetDrawColor(team.GetColor(LocalPlayer():Team()))
surface.DrawOutlinedRect(0,0,w,h)
/*surface.SetDrawColor(255,255,255)
surface.SetMaterial( Material( "logo/scp.png" ) )
surface.DrawTexturedRect(0,0, 36 / 1.5 ,36 / 1.5)*/
draw.SimpleTextOutlined(GetHostName(),"ScoreBoardTitleFont",S / 2 / 2 - 10,25,Color(255,255,255),TEXT_ALIGN_LEFT,TEXT_ALIGN_CENTER,1,Color(0,0,0,180))
draw.SimpleTextOutlined("Имя","ScoreBoardFont", 50,50,Color(255,255,255),TEXT_ALIGN_LEFT,TEXT_ALIGN_CENTER,1,Color(0,0,0,180))
draw.SimpleTextOutlined("Пинг","ScoreBoardFont",S - 50,50,Color(255,255,255),TEXT_ALIGN_LEFT,TEXT_ALIGN_CENTER,1,Color(0,0,0,180))
draw.SimpleTextOutlined("Профессия","ScoreBoardFont",S / 2 - 34 ,50,Color(255,255,255),TEXT_ALIGN_LEFT,TEXT_ALIGN_CENTER,1,Color(0,0,0,180))
draw.SimpleTextOutlined("Уровень","ScoreBoardFont",S / 2 + 145 ,50,Color(255,255,255),TEXT_ALIGN_LEFT,TEXT_ALIGN_CENTER,1,Color(0,0,0,180))
--draw.SimpleTextOutlined("Создал TAB - Kydesn1k","ScoreBoardFont", 15,S / 2 + 480,Color(255,255,255),TEXT_ALIGN_LEFT,TEXT_ALIGN_CENTER,1,Color(0,0,0,180))
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local ListPanel = vgui.Create("DPanel", Scoreboard)
ListPanel:SetSize(580,700)
ListPanel:SetPos(10,60)
ListPanel.Paint = function(self,w,h)
draw.RoundedBox(2,0,0,w,h,Color(255,255,255,0))
surface.SetDrawColor(team.GetColor(LocalPlayer():Team()))
surface.DrawOutlinedRect(0,0,w,h)
end
local PlayerScrollPanel = vgui.Create("DScrollPanel", ListPanel)
PlayerScrollPanel:SetSize(ListPanel:GetWide(),ListPanel:GetTall())
PlayerScrollPanel:SetPos(2,2)
PlayerListTop = vgui.Create("DListLayout", PlayerScrollPanel)
PlayerListTop:SetSize(PlayerScrollPanel:GetWide()-4,PlayerScrollPanel:GetTall()-4)
PlayerListTop:SetPos(0,0)
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if IsValid(Scoreboard) then
PlayerListTop:Clear()
local PLAYERS = player.GetAll()
table.sort( PLAYERS, function( a, b ) return team.GetName( a:Team() ) < team.GetName( b:Team() ) end )
for k,v i
Next time please translate everything to english. All you need is [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Global/DermaMenu]DermaMenu[/url]. Btw, after the last update to [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/gui/OpenURL]gui.OpenURL[/url], try to use [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Player/ShowProfile]Player:ShowProfile[/url] for players profile buttons.
Sorry, you need to Log In to post a reply to this thread.