SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 22/05/2017, 08:38 PM   #1
Private200
High-roller
 
Private200's Avatar
 
Join Date: May 2012
Posts: 1,176
Reputation: 211
Default Weed system [v1.2] [UPDATED]

Weed system
_________________________________________________

I started working on this weed system two days ago since I felt that I had left Pawno behind,I thought I had to make something just so I would not forget this as a language. A lot of ideas crossed my mind however, weed system seemed like one which has not been published that many times in the past and that always holds a spot for improvements and new ideas. This drug system is not that advanced and there are certainly way better options than this out there (rootcause's drug system for example). I did not progress this system into personal use like smoking, selling, statistics etcetera however, it is limited to the script variables. There is also no saving system and whoever who has the the basic knowledge of MySQL/INI will be able to properly insert saving system into this script.

Credits:
- ******, even if not part of these forums anymore, his foreach, y_timer and y_iterate have been used in this script and therefore, it wouldn't be the same without them (not to mention the amount of coding lines those includes have saved me)

However, lets jump straight onto the screenshots of this project:



















UPDATED

Commands

/buyseeds - Allows you to buy seeds of your choice
/myseeds - shows you the seeds you got on you
/mydrugs - shows you the drugs you got on you, also lets you manage them
/pickpackup - picks up the dropped package (if near any)
/collectweed - collects the weed plant you are next to
/plantseed - plants a seed of a specific type (slots can be taken from /myseeds)


Limitations

- You can only plant a maximum of 1'000 weed seeds at a time (that would be almost 1'000 timers running at once)
- There can only be a maximum of 1'000 drug bags dropped at a time (script is using streamer to create the object, therefore more can be created)
- There can only be 5 type of seeds as of now. You are able to change this amount as you wish, though you are required to make changes in the script (might be changed in the future)

Adding new type of seed

Line 51; 52, there's this variable:

PHP Code:
new SeedInformation[][seedpacks] =
{
    {
0"Cannabis Indica"500360},
    {
1"Cannabis Sativa"500130}
}; 
To add a new one, you just add a new line which goes like:
{id, "name", price, grams_per_seed, time_in_seconds}
- You can only add a maximum of five drugs/seeds and ID's MUST be increasing regularly (0 -> 1 -> 2 -> 3 -> 4)

Download: Pastebin (Last updated: 12/06/2017)

Last edited by Private200; 06/02/2020 at 10:37 PM.
Private200 is offline   Reply With Quote
Old 22/05/2017, 09:32 PM   #2
Astralis
Guest
 
Posts: n/a
Default Re: Weed system (Grow, plant, give, drop, different type of seeds, different type of weeds, customizable)

That's pretty cool!
  Reply With Quote
Old 22/05/2017, 09:51 PM   #3
LazzyBoy
Big Clucker
 
Join Date: Mar 2017
Posts: 191
Reputation: 15
Default Re: Weed system (Grow, plant, give, drop, different type of seeds, different type of weeds, customizable)

Nice one mate , keep it up.

Also check the title "Dynamic Faction System" xD.
__________________
LazzyBoy is offline   Reply With Quote
Old 22/05/2017, 11:09 PM   #4
Fairuz
Huge Clucker
 
Fairuz's Avatar
 
Join Date: Sep 2015
Location: Indonesia
Posts: 455
Reputation: 78
Default Re: Weed system (Grow, plant, give, drop, different type of seeds, different type of weeds, customizable)

Good job
Why is this 'dynamic faction system'? lol
__________________
Los Santos based Cops and Robbers with many features.
209.58.183.101:7777
Fairuz is offline   Reply With Quote
Old 22/05/2017, 11:10 PM   #5
fatlirmorina
Big Clucker
 
Join Date: Nov 2013
Posts: 70
Reputation: 1
Default Re: Weed system (Grow, plant, give, drop, different type of seeds, different type of weeds, customizable)

"albanian weed" heh.
fatlirmorina is offline   Reply With Quote
Old 23/05/2017, 02:47 AM   #6
Kimsa
Banned
 
Join Date: May 2017
Location: Philippines
Posts: 26
Reputation: 8
Default Re: Weed system (Grow, plant, give, drop, different type of seeds, different type of weeds, customizable)

Awesome!
Kimsa is offline   Reply With Quote
Old 23/05/2017, 11:04 AM   #7
RxErT
Huge Clucker
 
Join Date: May 2016
Location: SA:MP Lemon
Posts: 243
Reputation: 12
Default Re: Weed system (Grow, plant, give, drop, different type of seeds, different type of weeds, customizable)

Creative nice i like it
RxErT is offline   Reply With Quote
Old 23/05/2017, 12:04 PM   #8
SyS
High-roller
 
SyS's Avatar
 
Join Date: Oct 2015
Posts: 1,939
Reputation: 504
Default Re: Weed system (Grow, plant, give, drop, different type of seeds, different type of weeds, customizable)

nice
SyS is offline   Reply With Quote
Old 23/05/2017, 12:09 PM   #9
Bolex_
Gangsta
 
Bolex_'s Avatar
 
Join Date: Aug 2015
Location: Croatia.
Posts: 585
Reputation: 120
Default Re: Weed system (Grow, plant, give, drop, different type of seeds, different type of weeds, customizable)

Look nice and decent, but the script could have been written better!
Bolex_ is offline   Reply With Quote
Old 23/05/2017, 01:37 PM   #10
Private200
High-roller
 
Private200's Avatar
 
Join Date: May 2012
Posts: 1,176
Reputation: 211
Default Re: Weed system (Grow, plant, give, drop, different type of seeds, different type of weeds, customizable)

Quote:
Originally Posted by Bolex_ View Post
Look nice and decent, but the script could have been written better!
I would love to know how.
Private200 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Argument type mismatch ( type 2 ) Laure Scripting Help 10 05/05/2014 10:16 AM
Are arrays reference-type or value-type in PAWN? Cameryn Scripting Help 2 16/06/2013 07:50 PM
/plant weed ( Object wont come up ) oshrizzz Scripting Help 13 19/10/2011 01:17 PM
[SOLVED] Enable Textdraw when type a command and disable when type the ...... RyDeR` Help Archive 2 11/08/2009 09:02 PM


All times are GMT. The time now is 07:56 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.