So what I've been trying to do is making it so you're capable of crafting coke and weed in your mixtures tab instead of having to mix it in world. I don't know how to go about doing this but the only attempt I had was changing the mixinworld false while making the results of the mixture "ent_pot" (Which would just completely remove weed from the menu) If I just have Mixture.Mixinworld false, it just crafts the finished bag of weed. Any suggestions on how to make it so it crafts coke / weed as an entity?
[QUOTE]local MIXTURE = {}
MIXTURE.ID = 17
MIXTURE.Results = "drug_pot"
MIXTURE.Ingredients = {"drug_pot_seeds", "item_pot"}
MIXTURE.Requires = {
{GENE_INTELLIGENCE, 1},
{GENE_DEXTERITY, 1},
}
MIXTURE.Free = true
MIXTURE.Category = "Drugs"
MIXTURE.RequiresHeatSource = false
MIXTURE.RequiresWaterSource = false
MIXTURE.MixInWorld = false
function MIXTURE.CanMix ( player, pos )
if (player:IsGovernmentOfficial()) then
player:Notify("You cannot do this as a government official.")
return false
end
local NumDrugs = 0
for k, v in pairs(ents.FindByClass('ent_pot')) do
if v:GetTable().maker == player:SteamID() then
NumDrugs = NumDrugs + 1
end
end
local iCanHave = MAX_POT
if(player:IsGoldMember()) then
iCanHave = iCanHave * 3
elseif player:IsVIP() then
iCanHave = iCanHave * 2
end
if NumDrugs >= iCanHave then
player:Notify('You have hit the maximum number of pot plants allowed.')
return false
end
return true
end[/QUOTE]
Sorry, you need to Log In to post a reply to this thread.