Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local MIXTURE = {};
- MIXTURE.ID = 'entity_pot_plant';
- MIXTURE.Name = 'Entity: Cannabis Plant';
- MIXTURE.Requires = {'drug_pot_seeds', 'item_pot'};
- MIXTURE.Produces = 'pot';
- MIXTURE.Produces_Text = 'Cannabis plant which produces marijuana and seeds.';
- MIXTURE.RequiredSkills = {{skill = 'Intelligence', level = 1}};
- // MIXTURE.HowTo = 'test how to\ntest';
- function MIXTURE.CanMix ( MixturePosition, Player )
- local NumDrugs = 0;
- for k, v in pairs(ents.FindByClass('pot')) do
- if v:GetTable().ItemSpawner == Player then
- NumDrugs = NumDrugs + 1;
- end
- end
- if NumDrugs >= 8 then
- Player:Notify('You have hit the maximum number of pot plants allowed.');
- return false;
- end
- if Player:IsGovernmentOfficial() then
- Player:Notify('You cannot do this as a government official!');
- return false;
- end
- return true;
- end
- GM:RegisterMixture(MIXTURE);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement