Help with admin mod

My friend is creating a small admin mod but having problem kicking people
There are no Errors just doesnt do anything

The server side is fine and he doesnt want me uploading that part

Client Side


local PlayerList = vgui.Create("DComboBox", MenuPanel)
    PlayerList:SetPos(5, 220)
    PlayerList:SetSize(MenuPanel:GetWide()-10, 210)
    PlayerList:SetMultiple( false )
for k,v in pairs(player.GetAll()) do
    PlayerList:AddItem(v:Nick())
end
 
 
local KickButton = vgui.Create("DButton", MenuPanel)
    KickButton:SetWidth(MapMenu:GetSize()/2-25)
    KickButton:SetHeight(25)
    KickButton:SetPos(5, 440)
    KickButton:SetText("Kick")
    KickButton.DoClick = function( KickButton )
            RunConsoleCommand( "kickid", PlayerList:GetSelectedItems()[1]:GetValue())
        MapMenu:Remove()
    end

it’s kick not kickid.

What if you wanna kick someone using their name with a reason

[lua]local PlayerList = vgui.Create(“DComboBox”, MenuPanel)
PlayerList:SetPos(5, 220)
PlayerList:SetSize(MenuPanel:GetWide()-10, 210)
PlayerList:SetMultiple( false )
for k,v in pairs(player.GetAll()) do
PlayerList:AddItem(v:Nick())
end

local KickButton = vgui.Create(“DButton”, MenuPanel)
KickButton:SetWidth(MapMenu:GetSize()/2-25)
KickButton:SetHeight(25)
KickButton:SetPos(5, 440)
KickButton:SetText(“Kick”)
KickButton.DoClick = function( KickButton )
RunConsoleCommand( “kick”, PlayerList:GetSelectedItems()[1]:GetValue())
MapMenu:Remove()
end[/lua]
This should work.

[lua]
local PlayerList = vgui.Create(“DComboBox”, MenuPanel)
PlayerList:SetPos(5, 220)
PlayerList:SetSize(MenuPanel:GetWide()-10, 210)
PlayerList:SetMultiple( false )
for k,v in pairs(player.GetAll()) do
PlayerList:AddItem(v:Nick())
end

local KickButton = vgui.Create(“DButton”, MenuPanel)
KickButton:SetWidth(MapMenu:GetSize()/2-25)
KickButton:SetHeight(25)
KickButton:SetPos(5, 440)
KickButton:SetText(“Kick”)
KickButton.DoClick = function( KickButton )
Derma_StringRequest("Kicking: "…PlayerList:GetSelectedItems()[1]:GetValue(), “Kick Reason”, “”,
function(Text)
RunConsoleCommand(“kickid”, PlayerList:GetSelectedItems()[1]:GetValue(), Text)
end,
function(Text)
end,
“Kick”, “Cancel”)
MapMenu:Remove()
end
[/lua]

Error: GetSelectedItems (A nil value)
Line: RunConsoleCommand(“kickid”, PlayerList:GetSelectedItems()[1]:GetValue(), Text)

[editline]08:54PM[/editline]

I’m trying to make it so it kicks you with a reason.

What is this for?

Kick and Cancel button

I noticed that when selecting a player then pressing kick it will say the name then name not found

Yeah it will display on top of the derma “Kicking jaythorpe” and then a reason box.