I have tried several ways to blacklist items using a lua file.
[CODE]"FPP_sendblocked", "model path"[/CODE]
[CODE]FPP.BlockedModels["model path"] = true[/CODE]
None work though
AddBlock code
[CODE] local function addblock(pan, Type)
local label = pan:Add("DLabel")
label:SetText("\n"..Type.." black/whitelist entities:")
label:SetTextColor(Color(0, 0, 0, 255))
label:SizeToContents()
local lview = pan:Add("DListView")
lview:AddColumn("Entity")
BlockedLists[string.lower(Type)] = lview
RunConsoleCommand("FPP_sendblocked", Type)
local RemoveSelected = pan:Add("DButton")
RemoveSelected:SetText("Remove Selected items from the list")
RemoveSelected:SetDisabled(not superadmin)
RemoveSelected.DoClick = function()
for k,v in pairs(lview.Lines) do
if v:IsLineSelected() then
local text = v.text
timer.Simple(k/10, function() RunConsoleCommand("FPP_RemoveBlocked", Type, text) end)
lview:RemoveLine(k)
lview:SetTall(17 + #lview:GetLines() * 17)
pan:InvalidateLayout()
pan:GetParent():GetParent():InvalidateLayout()
end
end[/CODE]
Can you post the AddBlocked function in code tags?
Ohhh I understand what you mean, just a min
[editline]16th September 2014[/editline]
[QUOTE=code_gs;46000165]Can you post the AddBlocked function in code tags?[/QUOTE]
turns out the FPP_AddBlocked is for adding entites to the toolgun blacklist.
so sendblocked is the only one that could be used.
Sorry, you need to Log In to post a reply to this thread.