Hello! I have spent some time coding a DarkRP drug plant and decided to share it.
(Please note that im new to lua so dont expect the code to be perfect)
[U]Features:[/U]
*Grows when seed is added
*harvest for 500 dollars
*Breaks when hit or shot 5 times (No seize reward yet)
*Plant dies if it is not harvested once fully grown, takes 5 minutes (prevents lag)
[IMG]http://i.imgur.com/1uKfwrX.png?1[/IMG]
To get the plant to grow you must spawn the seed and put it next to the plant pot.
The plant has 5 grow stages and takes a total of 5 minutes to grow (can change grow time)
(When the seed has been put in the pot it is at stage 1)
Stage 2 - 20 seconds.
Stage 3 - 40 seconds.
Stage 4 - 80 seconds.
Stage 5 - 160 seconds.
Once the plant is at stage 5 you can press e (Use button) to harvest the plant for 500 dollars which is added directly to your DarkRP wallet (can change harvest price)
Download it [URL="https://www.dropbox.com/s/hs30r2qkvt22zgs/drugplant.zip"]here[/URL]
Very good addon!
Great, its nice to see people spending times to code things.
My only complaint is this has been done before (although I understand you did this to practice lua)
Good job, hope to see other stuff come from you
^^^
I hope to see more stuff as well. Keep up the good work. Your a good coder.
What a nice addon! CoOoOoOoOoOl
Looks nice , is this for Sandbox mode too? :smile:
Has no back door (Script clean). :v:
Thats not weed its a fern :P
I like how it dies after 5 minutes. It prevents people having loads and running around for hours to come back to a stack of money and I think it emphasises the care that it takes to grow such a plant right.
looks great! but.. how can i install this? i got 2 folders, "drug_plant" and "drug_seed", so where do i put them? and after that, how do i give special jobs the ability to spawn them? i'ld die to know that :P (iam fresh in the buis, dont mind pls)
[QUOTE=Arkian123;44354863]looks great! but.. how can i install this? i got 2 folders, "drug_plant" and "drug_seed", so where do i put them? and after that, how do i give special jobs the ability to spawn them? i'ld die to know that :P (iam fresh in the buis, dont mind pls)[/QUOTE]
Depends what version of darkrp. 2.5 = put in the darkrpmodification addon in the lua/entities folder.
2.4 it will be in like darkrp/entities
[QUOTE=ds;44355874]Depends what version of darkrp. 2.5 = put in the darkrpmodification addon in the lua/entities folder.
2.4 it will be in like darkrp/entities[/QUOTE]
Thanks for the reply =)
Still, i dont know how to add this to a class - the 2 folders are now in lua/entities, but is there a custom file for that? does it belong to jobs? would be great to get helped out here though!
(for clarity, want to add this to the mob, gang, and my 2 rebel and rebelboss classes)
[lua]DarkRP.createEntity("Weed Pot", {
ent = "drug_plant",
model = "models/props_c17/pottery06a.mdl",
price = 750,
max = 5,
cmd = "buypot"
})
DarkRP.createEntity("Weed Seed", {
ent = "drug_seed",
model = "models/props/cs_office/trash_can_p4.mdl",
price = 225,
max = 5 ,
cmd = "buyseed"
})[/lua]
Goes inside of darkrpmodification/lua/darkrp_customthings (Only on 2.5.1) If you're on 2.4.3 or lower you need to specify so I can supply 100% correct help.
If you have issues google is your friend.
Is there anyway to get a working link ?
I think author should update download link.
Can anyone else provide a download link for this addon?
Sorry, you need to Log In to post a reply to this thread.