Jump to content
MakeWebGames

Grow Weed Mod


Newbie

Recommended Posts

UPDATED 22/01/2014

ok small update if you use growsetup below this messgage and insert the new database table then it will insert there and you will need to add small bit of code to cron day

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

then use new growsetup below

growsetup.php

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

and last the cron info now

open up your daily cron and put this in it

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

this is untested so any bugs or whatever post here and ill take a look

 

 

 

 

 

 

Here is my Grow Weed Mod

Files

> seedbank.php

> growsetup.php

> growshop.php

> medical.php

SQL

> Seed Bank

> Grow Shop

> 4 tables in users

-----------------------------------------

Info

Users can buy a hydroponics setup and seeds which will give them access to growing some weed

unfortunately i ran into some bumps during the writing of this modification so had to rewrite some of the files

when a user sets up a grow the payout is instant (until i can get it changed)

random of 1-100 ounces easily changed i have tested and not found any errors so if you find any post here and ill see what i can do.

Database files first

updated 22.01.14

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

Change the 792 to anything you want stock to be i extracted it from my table so its updated the random stock number for that day

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

seedbank.php

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

seedbuy.php

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

medical.php

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

growshop.php

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

growsetup.php

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 
Link to comment
Share on other sites

Not bad looking. It could maybe use some cleanups but I got a couple questions:

1. Did you intend to make the medical.php only available to locations 1 and 2?

2. This goes with question 1, why choose America, are we all stoners haha?

3. Why not make it to where the player can choose the amount of seeds to purchase, and is it necessary to make a db column for the amount of seeds?

4. What about a staff file to create more entries in the db to add/change and all that kinda stuff?

Other than that I think its a great job and its a start for people to use this and let their imaginations run wild with it

Link to comment
Share on other sites

Not bad looking. It could maybe use some cleanups but I got a couple questions:

1. Did you intend to make the medical.php only available to locations 1 and 2?

2. This goes with question 1, why choose America, are we all stoners haha?

3. Why not make it to where the player can choose the amount of seeds to purchase, and is it necessary to make a db column for the amount of seeds?

4. What about a staff file to create more entries in the db to add/change and all that kinda stuff?

Other than that I think its a great job and its a start for people to use this and let their imaginations run wild with it

1.

Nope i didnt thanks for pointing that out. My location number 3 is America i did this because i was planning on adding in a bit for users to get busted if they dont have a medical card which only place i know of which does such a thing in real life is america in some states

3.

not quite sure how to do this i imaging it would be sumthing like in the shops you select amount and buy it ill look into it and see what i can do

4. i am not to good at staff files but ill give it a go

thanks for your comment

steve

Link to comment
Share on other sites

You can maybe try something like this and give me a break since I am on my phone:

In seedbank find:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Replace with:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Then you can do something like:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Then just do a check for the seed cost amount to make sure they have the money.

And if your not too keen on staff files do what I do and just use something like staff items as a template kinda

Edit

And for the medical card you can do something like

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Edited by KyleMassacre
my phone is going crazy
Link to comment
Share on other sites

Try something like this:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

I get confused but sometimes adding a ' around a variable throws error I dont remember if I get them with ints or alpha chars and also you were missing a )

Edited by KyleMassacre
Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

When i try to add this to my database

ALTER TABLE `users` ADD `medical` int(11) NOT NULL DEFAULT '0'

ALTER TABLE `users` ADD `hydrokit` int(11) NOT NULL DEFAULT '0'

ALTER TABLE `users` ADD `seeds` int(11) NOT NULL DEFAULT '0'

ALTER TABLE `users` ADD `ounces` int(11) NOT NULL DEFAULT '0'

Im getting this error: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALTER TABLE `users` ADD `hydrokit` int(11) NOT NULL DEFAULT '0' ALTER TABLE `us' at line 2

Link to comment
Share on other sites

When i try to add this to my database

ALTER TABLE `users` ADD `medical` int(11) NOT NULL DEFAULT '0'

ALTER TABLE `users` ADD `hydrokit` int(11) NOT NULL DEFAULT '0'

ALTER TABLE `users` ADD `seeds` int(11) NOT NULL DEFAULT '0'

ALTER TABLE `users` ADD `ounces` int(11) NOT NULL DEFAULT '0'

Im getting this error: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALTER TABLE `users` ADD `hydrokit` int(11) NOT NULL DEFAULT '0' ALTER TABLE `us' at line 2

Add a semi-colon at the end of each line

Link to comment
Share on other sites

When i try to add this to my database

ALTER TABLE `users` ADD `medical` int(11) NOT NULL DEFAULT '0'

ALTER TABLE `users` ADD `hydrokit` int(11) NOT NULL DEFAULT '0'

ALTER TABLE `users` ADD `seeds` int(11) NOT NULL DEFAULT '0'

ALTER TABLE `users` ADD `ounces` int(11) NOT NULL DEFAULT '0'

Im getting this error: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALTER TABLE `users` ADD `hydrokit` int(11) NOT NULL DEFAULT '0' ALTER TABLE `us' at line 2

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...