Hey! I’m currently coding for a costumer (I suck at coding huds). And I’m making a list form of the Jobs SpawnIcons in DarkRP.
How would I make a panel (200, 64) long with a SpawnIcon (64, 64) inside?
Code:
local function AddIcon(Model, name, description, Weapons, command, special, specialcommand)
local icon = vgui.Create("SpawnIcon")
local IconModel = Model
if type(Model) == "table" then
IconModel = Model[math.random(#Model)]
end
icon:SetModel(IconModel)
icon:SetSize(64, 64)
icon:SetToolTip()
icon.OnCursorEntered = function()
icon.PaintOverOld = icon.PaintOver
icon.PaintOver = icon.PaintOverHovered
Info[1] = DarkRP.getPhrase("job_name") .. name
Info[2] = DarkRP.getPhrase("job_description") .. description
Info[3] = DarkRP.getPhrase("job_weapons") .. Weapons
model = IconModel
UpdateInfo()
end
There are no errors. Just to be clear