Okay, I am making an inventory for my gamemode. The only problem, however, is that my spawn icons refuse to generate. I have two problems.
- In my inventory enlarger, (you click on an item and it enlarges it and gives info, ect) the default icon generates as an error.
- In my main inventory, empty slots do not generate.
The model i am using to fill empty inventory slots is an invisible cube model.
Yes, the cube model works when spawned in sandbox and using ent_create in my gamemode.
The code i am using (clientside) to generate empty inventory slots is as follows:
slot2 = vgui.Create(“SpawnIcon”, ivd)
if LocalPlayer():GetNetworkedInt(“IS2”) > -1 then
slot2:SetToolTip(“Empty Item Slot”)
Yes, before you ask, the ToolTip for empty slots sets itself.
the invisimodel is defined up the top of the function like this:
invisimodel = “models/RealRP/nicktendopefish64/invisicube.mdl”
The code i use for the item info bar spawnicon is as follows:
enlarger = vgui.Create(“SpawnIcon”, invent)
Here is a screenshot of the problem:
[editline]7th July 2012[/editline]
Oh, also before you get confused, ItemModelArray and ItemNameArray are arrays where the item names and models are stored.