If I remember right, you just need to set the category within the item file to the name of what you want it to be in the business menu.
Basically:
ITEM.category = "Clothing";
EDIT: Also, on the note that you said it costs 16k for items; If you are using the salesman, make sure you have the price multiplier set lower. This will make sure it doesn't escalate the price to outrageous amounts.
Click to expand...
Code:
local ITEM = Clockwork.item:New();
ITEM.name = "Tattered Gloves";
ITEM.model = "models/tnb/items/gloves.mdl";
ITEM.weight = 1;
ITEM.useText = "Wear Gloves";
ITEM.category = "Clothing";
ITEM.description = "A pair of grey mittens, the fingers have been removed.";
ITEM.customFunctions = {"Remove"};
ITEM.access = "1";
ITEM.cost = 180;
ITEM.business = true;
local bodyGroup = 3;
-- Called when a player drops the item.
function ITEM:OnDrop(player, position)
local target = player
local targetBodyGroups = target:GetCharacterData("BodyGroups") or {};
local bodyGroupState = 0;
local model = target:GetModel();
if( bodyGroup < target:GetNumBodyGroups() )then
targetBodyGroups[model] = targetBodyGroups[model] or {};
if( bodyGroupState == 0 )then
targetBodyGroups[model][tostring(bodyGroup)] = nil;
else
targetBodyGroups[model][tostring(bodyGroup)] = bodyGroupState;
end;
target:SetBodygroup(bodyGroup, bodyGroupState);
target:SetCharacterData("BodyGroups", targetBodyGroups);
end;
return true
end;
if (CLIENT) then
function ITEM:GetClientSideInfo()
if (!self:IsInstance()) then return; end;
if (Clockwork.player:IsWearingItem(self)) then
return "Is Wearing: Yes";
else
return "Is Wearing: No";
end;
end;
end;
-- Called when a player uses the item.
function ITEM:OnUse(player, itemEntity)
if (player:Alive() and !player:IsRagdolled()) then
if (!self.CanPlayerWear or self:CanPlayerWear(player, itemEntity) != false) then
local target = player
local targetBodyGroups = target:GetCharacterData("BodyGroups") or {};
local bodyGroupState = 1;
local model = target:GetModel();
if( bodyGroup < target:GetNumBodyGroups() )then
targetBodyGroups[model] = targetBodyGroups[model] or {};
if( bodyGroupState == 0 )then
targetBodyGroups[model][tostring(bodyGroup)] = nil;
else
targetBodyGroups[model][tostring(bodyGroup)] = bodyGroupState;
end;
target:SetBodygroup(bodyGroup, bodyGroupState);
target:SetCharacterData("BodyGroups", targetBodyGroups);
return true;
end;
end;
end;
end;
if (SERVER) then
function ITEM:OnCustomFunction(player, name)
if (name == "Remove") then
local target = player
local targetBodyGroups = target:GetCharacterData("BodyGroups") or {};
local bodyGroupState = 0;
local model = target:GetModel();
if( bodyGroup < target:GetNumBodyGroups() )then
targetBodyGroups[model] = targetBodyGroups[model] or {};
if( bodyGroupState == 0 )then
targetBodyGroups[model][tostring(bodyGroup)] = nil;
else
targetBodyGroups[model][tostring(bodyGroup)] = bodyGroupState;
end;
target:SetBodygroup(bodyGroup, bodyGroupState);
target:SetCharacterData("BodyGroups", targetBodyGroups);
end;
end;
end;
end;
ITEM:Register();
the item i wanna create the business is "hl2ts2" and its alredy at category business when i added it just goed to general goods and made it 16 k