I'm trying to make a script to add a list of models I have to the FPP Blacklist.
What I have is this:
[CODE]
local blockedmodels = [[model models/cranes/crane_frame.mdl,
models/items/item_item_crate.mdl,
models/props/cs_militia/silo_01.mdl,
models/props/cs_office/microwave.mdl,
models/props/de_train/biohazardtank.mdl,]]
local propnamestable = string.Split(blockedmodels, ",")
for k,v in pairs(propnamestable) do
RunConsoleCommand("FPP_AddBlockedModel",v)
end
[/CODE]
But what happens is it blacklists them as " models/props/de_train/biohazardtank.mdl" with a space before them so it doesn't actually work.
[editline]28th June 2016[/editline]
Nevermind, I fixed it by doing this:
[CODE]
local blockedmodels = [[model models/cranes/crane_frame.mdl,models/items/item_item_crate.mdl,models/props/cs_militia/silo_01.mdl,models/props/cs_office/microwave.mdl,models/props/de_train/biohazardtank.mdl]]
local propnamestable = string.Split(blockedmodels, ",")
for k,v in pairs(propnamestable) do
RunConsoleCommand("FPP_AddBlockedModel",v)
end
[/CODE]
Sorry, you need to Log In to post a reply to this thread.