Newbie Posted December 11, 2012 Share Posted December 11, 2012 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. Quote Link to comment Share on other sites More sharing options...
AnonymousUser Posted December 11, 2012 Share Posted December 11, 2012 why not just have the users tables under one [ code ] ? Quote Link to comment Share on other sites More sharing options...
Newbie Posted December 11, 2012 Author Share Posted December 11, 2012 haha never thought of that done now Quote Link to comment Share on other sites More sharing options...
Newbie Posted December 11, 2012 Author Share Posted December 11, 2012 (edited) EDIT: V1 connertion Edited December 12, 2012 by Newbie Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted December 12, 2012 Share Posted December 12, 2012 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 Quote Link to comment Share on other sites More sharing options...
Newbie Posted December 12, 2012 Author Share Posted December 12, 2012 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 Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted December 12, 2012 Share Posted December 12, 2012 (edited) 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 December 12, 2012 by KyleMassacre my phone is going crazy Quote Link to comment Share on other sites More sharing options...
Newbie Posted December 12, 2012 Author Share Posted December 12, 2012 alright cool thanks kyle ill take a look later when got some time and try sort that and the error you spotted Quote Link to comment Share on other sites More sharing options...
Newbie Posted December 12, 2012 Author Share Posted December 12, 2012 ok i managed to add the buy any qty op updated overwrite old seedbank.php with new one and add seedbuy.php to your main directory and your done Thanks for the help kyle Quote Link to comment Share on other sites More sharing options...
Newbie Posted December 12, 2012 Author Share Posted December 12, 2012 so i attempted the staff file to add a item to the grow shop (failed) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. there is something up with the query :( any help would be greatfull Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted December 12, 2012 Share Posted December 12, 2012 What errors are you getting or what seems to be the issue? Quote Link to comment Share on other sites More sharing options...
Newbie Posted December 13, 2012 Author Share Posted December 13, 2012 it just says query error when i try to add the shop using staff menu it worked when i did this but only inserted the info that was already in You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted December 13, 2012 Share Posted December 13, 2012 (edited) 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 December 13, 2012 by KyleMassacre Quote Link to comment Share on other sites More sharing options...
Newbie Posted December 13, 2012 Author Share Posted December 13, 2012 i will give it a try tommorow but from what you have posted its the same thing i tried Quote Link to comment Share on other sites More sharing options...
danny420 Posted December 20, 2012 Share Posted December 20, 2012 hello thanks for the great mod but i am getting this error Fatal error: Call to undefined method database::free_result() in /home/kushcent/public_html/seedbuy.php on line 46 can you help? Thanks Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted December 20, 2012 Share Posted December 20, 2012 You should be able to just delete that Quote Link to comment Share on other sites More sharing options...
danny420 Posted December 22, 2012 Share Posted December 22, 2012 How do i delete? Quote Link to comment Share on other sites More sharing options...
Newbie Posted January 23, 2013 Author Share Posted January 23, 2013 How do i delete? open seedbuy.php and look for free_result(); and delete that out as i use version 2.0b Quote Link to comment Share on other sites More sharing options...
padda Posted April 3, 2013 Share Posted April 3, 2013 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 Quote Link to comment Share on other sites More sharing options...
sniko Posted April 3, 2013 Share Posted April 3, 2013 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 Quote Link to comment Share on other sites More sharing options...
padda Posted April 4, 2013 Share Posted April 4, 2013 Add a semi-colon at the end of each line Thanks that worked perfeckt Quote Link to comment Share on other sites More sharing options...
peterisgb Posted April 4, 2013 Share Posted April 4, 2013 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. Quote Link to comment Share on other sites More sharing options...
Raven1992 Posted April 17, 2013 Share Posted April 17, 2013 what file do i use to put on my explore page for this mod i got it all set up Quote Link to comment Share on other sites More sharing options...
peterisgb Posted April 17, 2013 Share Posted April 17, 2013 well seedbank.php, medical.php, growshop.php, growsetup.php, is your copy working, if so can you post it up, as this version dont work for me. Quote Link to comment Share on other sites More sharing options...
Raven1992 Posted April 17, 2013 Share Posted April 17, 2013 well seedbank.php, medical.php, growshop.php, growsetup.php, is your copy working, if so can you post it up, as this version dont work for me. what you mean mine works fine Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.